squid: move pidfile and statedir to /run
This commit is contained in:
parent
4107748777
commit
98b5c34c84
@ -181,6 +181,4 @@ drwxr-xr-x root/root usr/share/squid/icons/silk/
|
||||
drwxr-xr-x root/root var/
|
||||
drwxr-xr-x root/root var/log/
|
||||
drwx------ squid/squid var/log/squid/
|
||||
drwxr-xr-x root/root var/run/
|
||||
drwx------ squid/squid var/run/squid/
|
||||
drwx------ squid/squid var/squid/
|
||||
|
@ -1,6 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/opt.pub
|
||||
RWSE3ohX2g5d/SUm8e/z7JD2XOV/PIlpMblMGsFpxDRt7AxqMFyWSLtocfRZ4Ij2h3TsSV3gimPFZ54Wdkaq6McZ2VWJgDBiEAc=
|
||||
SHA256 (Pkgfile) = 2926a20fc4c63dfa9d59222d0308eb6c215509c9270715e4f6e28a6425789741
|
||||
SHA256 (.footprint) = ac5b1983a49857e75724d6923ed370e358a06fb898ea5a1400fad297cc9c99b7
|
||||
RWSE3ohX2g5d/RIQXlA6N0z10i006YmBtOG+kYkxGGemqUlyH1XeJdEMGw/WktmjHQuIe9NhpD/6E3GKCkcwRTiri5vICehhNAM=
|
||||
SHA256 (Pkgfile) = e70decc11d85324673aae0e131f108396bf561d1ddd514b5697f0a8b04df58aa
|
||||
SHA256 (.footprint) = 86ef6433e602fb7ce136697b81c5c3b04185d777ab56d06011fc72e4aa9dd653
|
||||
SHA256 (squid-5.4.1.tar.xz) = df4d310a91663ae59c29b0f8183f22623c5e6f731869af793805987ab94ca41c
|
||||
SHA256 (squid) = d4ff0ac128250907e7cce4a01d6d92d9ca7dde7d59e1c72fe89de72fa5488ec4
|
||||
SHA256 (squid) = c807a9373705537b648c38ed456ab016cc2fd7d40e6d47c20611931437588d96
|
||||
|
@ -5,13 +5,15 @@
|
||||
|
||||
name=squid
|
||||
version=5.4.1
|
||||
release=1
|
||||
release=2
|
||||
source=(http://www.squid-cache.org/Versions/v5/$name-$version.tar.xz
|
||||
squid)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
|
||||
sed '/DEFAULT_STATEDIR/s/$(localstatedir)//' -i src/ipc/Makefile.in
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc/squid \
|
||||
@ -19,7 +21,7 @@ build() {
|
||||
--localstatedir=/var \
|
||||
--datadir=/usr/share/squid \
|
||||
--with-logdir=/var/log/squid \
|
||||
--with-pidfile=/var/run/squid.pid \
|
||||
--with-pidfile=/run/squid.pid \
|
||||
--with-swapdir=/var/squid \
|
||||
--with-default-user=squid \
|
||||
--enable-linux-netfilter \
|
||||
@ -36,10 +38,9 @@ build() {
|
||||
make all
|
||||
make DESTDIR=$PKG install
|
||||
|
||||
rm -r $PKG/var/run
|
||||
rm -r $PKG/run $PKG/var/run
|
||||
find $PKG/usr/share/squid/errors/* -prune ! -name templates | xargs rm -r
|
||||
|
||||
install -d -m 0700 -o squid -g squid $PKG/var/{log/squid,squid}
|
||||
install -d -m 0700 -o squid -g squid $PKG/var/run/squid
|
||||
install -D -m 755 $SRC/squid $PKG/etc/rc.d/squid
|
||||
}
|
||||
|
@ -5,11 +5,12 @@
|
||||
|
||||
SSD=/sbin/start-stop-daemon
|
||||
PROG=/usr/sbin/squid
|
||||
PID=/var/run/squid.pid
|
||||
PID=/run/squid.pid
|
||||
OPTS="-Y"
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
install -o squid -g squid -m 0700 -d /run/squid
|
||||
$SSD --start --pidfile $PID --exec $PROG -- $OPTS
|
||||
;;
|
||||
stop)
|
||||
|
Loading…
x
Reference in New Issue
Block a user