Related: #1709299 - Use upstream squid.service
This commit is contained in:
parent
f109435113
commit
e795ebc437
@ -8,9 +8,14 @@ SQUID_CONF=${SQUID_CONF:-"/etc/squid/squid.conf"}
|
|||||||
CACHE_SWAP=`sed -e 's/#.*//g' $SQUID_CONF | \
|
CACHE_SWAP=`sed -e 's/#.*//g' $SQUID_CONF | \
|
||||||
grep cache_dir | awk '{ print $3 }'`
|
grep cache_dir | awk '{ print $3 }'`
|
||||||
|
|
||||||
|
init_cache_dirs=0
|
||||||
for adir in $CACHE_SWAP; do
|
for adir in $CACHE_SWAP; do
|
||||||
if [ ! -d $adir/00 ]; then
|
if [ ! -d $adir/00 ]; then
|
||||||
echo -n "init_cache_dir $adir... "
|
echo -n "init_cache_dir $adir... "
|
||||||
squid -N -z -F -f $SQUID_CONF >> /var/log/squid/squid.out 2>&1
|
init_cache_dirs=1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ $init_cache_dirs -ne 0 ]; then
|
||||||
|
squid --foreground -z -f $SQUID_CONF >> /var/log/squid/squid.out 2>&1
|
||||||
|
fi
|
||||||
|
@ -6,12 +6,12 @@ After=network.target network-online.target nss-lookup.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
LimitNOFILE=16384
|
LimitNOFILE=16384
|
||||||
|
PIDFile=/var/run/squid.pid
|
||||||
EnvironmentFile=/etc/sysconfig/squid
|
EnvironmentFile=/etc/sysconfig/squid
|
||||||
ExecStartPre=/usr/libexec/squid/cache_swap.sh
|
ExecStartPre=/usr/libexec/squid/cache_swap.sh
|
||||||
ExecStart=/usr/sbin/squid $SQUID_OPTS -f $SQUID_CONF
|
ExecStart=/usr/sbin/squid $SQUID_OPTS -f $SQUID_CONF
|
||||||
ExecReload=/usr/sbin/squid $SQUID_OPTS -k reconfigure -f $SQUID_CONF
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
ExecStop=/usr/sbin/squid -k shutdown -f $SQUID_CONF
|
KillMode=mixed
|
||||||
TimeoutSec=0
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: squid
|
Name: squid
|
||||||
Version: 4.7
|
Version: 4.7
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: The Squid proxy caching server
|
Summary: The Squid proxy caching server
|
||||||
Epoch: 7
|
Epoch: 7
|
||||||
# See CREDITS for breakdown of non GPLv2+ code
|
# See CREDITS for breakdown of non GPLv2+ code
|
||||||
@ -137,7 +137,6 @@ autoconf
|
|||||||
--with-openssl \
|
--with-openssl \
|
||||||
--with-pthreads \
|
--with-pthreads \
|
||||||
--disable-arch-native \
|
--disable-arch-native \
|
||||||
--with-pic \
|
|
||||||
--disable-security-cert-validators \
|
--disable-security-cert-validators \
|
||||||
--disable-strict-error-checking \
|
--disable-strict-error-checking \
|
||||||
--with-swapdir=%{_localstatedir}/spool/squid
|
--with-swapdir=%{_localstatedir}/spool/squid
|
||||||
@ -283,6 +282,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 21 2019 Lubos Uhliarik <luhliari@redhat.com> - 7:4.7-2
|
||||||
|
- Related: #1709299 - Use upstream squid.service
|
||||||
|
|
||||||
* Fri May 17 2019 Luboš Uhliarik <luhliari@redhat.com> - 7:4.7-1
|
* Fri May 17 2019 Luboš Uhliarik <luhliari@redhat.com> - 7:4.7-1
|
||||||
- new version 4.7
|
- new version 4.7
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user