mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-26 22:06:35 +01:00
network/squid: Updated for version 4.13.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
f48fae704f
commit
95a1e52ea9
6 changed files with 21 additions and 15634 deletions
|
@ -34,7 +34,7 @@ squid_start() {
|
|||
|
||||
# Create piddir and set proper permissions
|
||||
mkdir -p /var/run/squid
|
||||
chown root:@SQUIDGROUP@ /var/run/squid
|
||||
chown @SQUIDUSER@:@SQUIDGROUP@ /var/run/squid
|
||||
|
||||
echo "Starting Squid: $SQUIDCMD -F"
|
||||
$SQUIDCMD -F
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=squid
|
||||
VERSION=${VERSION:-3.5.26}
|
||||
VERSION=${VERSION:-4.13}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
|
@ -68,10 +68,10 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
|
|||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
OPT_ICAP=""
|
||||
if [ "${ICAP:-no}" = "yes" ]; then
|
||||
|
@ -117,26 +117,25 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|||
chown root:root $PKG/usr/doc/$PRGNAM-$VERSION/*
|
||||
|
||||
mkdir -p $PKG/etc/rc.d
|
||||
sed -e "s,@SQUIDGROUP@,$SQUIDGROUP," $CWD/rc.squid > $PKG/etc/rc.d/rc.squid.new
|
||||
sed -e "s,@SQUIDUSER@,$SQUIDUSER," -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 \
|
||||
sed -e "s,@SQUIDUSER@,$SQUIDUSER," -e "s,@SQUIDGROUP@,$SQUIDGROUP," $CWD/squid.logrotate \
|
||||
> $PKG/etc/logrotate.d/squid.new
|
||||
|
||||
mv $PKG/etc/squid/mime.conf $PKG/etc/squid/mime.conf.new
|
||||
mv $PKG/etc/squid/cachemgr.conf $PKG/etc/squid/cachemgr.conf.new
|
||||
rm $PKG/etc/squid/squid.conf
|
||||
cat $CWD/squid.conf > $PKG/etc/squid/squid.conf.new
|
||||
cat $CWD/squid.conf.documented > $PKG/etc/squid/squid.conf.documented
|
||||
( cd $PKG/etc/squid
|
||||
for i in mime cachemgr squid ; do mv $i.conf $i.conf.new ; done )
|
||||
cp src/squid.conf.documented $PKG/etc/squid/squid.conf.documented
|
||||
|
||||
mkdir -p $PKG/var/{cache,lib,run}/squid
|
||||
chown $SQUIDUSER:$SQUIDGROUP $PKG/var/{cache,lib,log,run}/squid
|
||||
|
||||
## Edit the config file to set the user and group to run as
|
||||
sed -i -e 's%^cache_effective_user nobody%cache_effective_user '"$SQUIDUSER"'%g' \
|
||||
$PKG/etc/squid/squid.conf.new
|
||||
sed -i -e 's%^cache_effective_group nobody%cache_effective_group '"$SQUIDGROUP"'%g' \
|
||||
$PKG/etc/squid/squid.conf.new
|
||||
# Set a chache dir, the user and group to run as and set the pid location
|
||||
sed -i "s|^#cache_dir|cache_dir|" $PKG/etc/squid/squid.conf.new
|
||||
echo -e "\npid_filename /var/run/squid/squid.pid" >> $PKG/etc/squid/squid.conf.new
|
||||
echo "cache_effective_user $SQUIDUSER" >> $PKG/etc/squid/squid.conf.new
|
||||
echo "cache_effective_group $SQUIDGROUP" >> $PKG/etc/squid/squid.conf.new
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="squid"
|
||||
VERSION="3.5.26"
|
||||
VERSION="4.13"
|
||||
HOMEPAGE="http://www.squid-cache.org/"
|
||||
DOWNLOAD="http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.26.tar.xz"
|
||||
MD5SUM="510e2c84773879c00d0e7ced997864d9"
|
||||
DOWNLOAD="http://www.squid-cache.org/Versions/v4/squid-4.13.tar.xz"
|
||||
MD5SUM="492e54afc15821141ff1d1d9903854d6"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# reopen squid.log, effectively using the new logfile. The old logfile
|
||||
# (squid.log.1) will be compressed by logrotate's next invocation.
|
||||
/var/log/squid/*.log {
|
||||
su @USER@ @GROUP@
|
||||
su @SQUIDUSER@ @SQUIDGROUP@
|
||||
weekly
|
||||
rotate 5
|
||||
compress
|
||||
|
|
Loading…
Reference in a new issue