aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2016-03-20 02:50:42 -0500
committerRobby Workman <rworkman@slackbuilds.org>2016-03-20 02:50:59 -0500
commit074a79a5e6e3b30142443f8e505379e59aede74e (patch)
treeb7a025a4d4fc40ff2e8b2011ae3ee046c7c42f21
parent5428260e84b3d097c62b0f37511546beb1bba41c (diff)
network/squid: Fixup pid directory creation/usage
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r--network/squid/rc.squid4
-rw-r--r--network/squid/squid.SlackBuild5
2 files changed, 7 insertions, 2 deletions
diff --git a/network/squid/rc.squid b/network/squid/rc.squid
index c3a680046edcb..7aef4777fe146 100644
--- a/network/squid/rc.squid
+++ b/network/squid/rc.squid
@@ -32,6 +32,10 @@ squid_start() {
fi
done
+ # Create piddir and set proper permissions
+ mkdir -p /var/run/squid
+ chown root:@SQUIDGROUP@ /var/run/squid
+
echo "Starting Squid: $SQUIDCMD -F"
$SQUIDCMD -F
}
diff --git a/network/squid/squid.SlackBuild b/network/squid/squid.SlackBuild
index a0100a442a058..6182991c7faf6 100644
--- a/network/squid/squid.SlackBuild
+++ b/network/squid/squid.SlackBuild
@@ -110,9 +110,10 @@ cp -a \
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chown root:root $PKG/usr/doc/$PRGNAM-$VERSION/*
-mkdir -p $PKG/etc/{logrotate.d,rc.d}
-cat $CWD/rc.squid > $PKG/etc/rc.d/rc.squid.new
+mkdir -p $PKG/etc/rc.d
+sed -e "s,@SQUIDGROUP@,$SQUIDGROUP," $CWD/rc.squid > $PKG/etc/rc.d/rc.squid.new
+mkdir -p $PKG/etc/logrotate.d
sed -e "s,@USER@,$SQUIDUSER," -e "s,@GROUP@,$SQUIDGROUP," $CWD/squid.logrotate \
> $PKG/etc/logrotate.d/squid.new