aboutsummaryrefslogtreecommitdiffstats
path: root/main/squid
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-10-02 15:08:51 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-10-02 15:08:51 +0000
commitc5bd88369aff02c5f5dbcba51ffeacfa23956f53 (patch)
tree854269849021ccd9bca7e256bd2e27eeb8ad18f7 /main/squid
parent87b8b701a1d266c16262bd6a3c45a3bd475bd49b (diff)
downloadaports-c5bd88369aff02c5f5dbcba51ffeacfa23956f53.tar.bz2
aports-c5bd88369aff02c5f5dbcba51ffeacfa23956f53.tar.xz
main/squid: remove pidfile if squis is not running
fixes #174
Diffstat (limited to 'main/squid')
-rw-r--r--main/squid/APKBUILD4
-rw-r--r--main/squid/squid.initd11
2 files changed, 10 insertions, 5 deletions
diff --git a/main/squid/APKBUILD b/main/squid/APKBUILD
index dd4b80c76a..01f7bfa743 100644
--- a/main/squid/APKBUILD
+++ b/main/squid/APKBUILD
@@ -3,7 +3,7 @@
pkgname=squid
pkgver=2.7.6
_ver=2.7.STABLE6
-pkgrel=11
+pkgrel=12
pkgdesc="A full-featured Web proxy cache server."
url="http://www.squid-cache.org"
install="squid.pre-install squid.pre-upgrade squid.post-install"
@@ -279,7 +279,7 @@ errors_ukrainian_utf8() {
md5sums="6de3a6a7a56a7ecae092f2d31a04f039 squid-2.7.STABLE6.tar.bz2
-1f65e9dad473a027773c1f9a3eaf04b5 squid.initd
+57fed05adc40acab6a5480ec7a014154 squid.initd
44b052db7910f386ef88ddcf69c9ba4e squid.confd
3827f71d940b47eb385a1a1d92a51d66 squid-2.7-gentoo.patch
58823e0b86bc2dc71d270208b7b284b4 squid.logrotate"
diff --git a/main/squid/squid.initd b/main/squid/squid.initd
index beaea0b17a..2eaf1dd2af 100644
--- a/main/squid/squid.initd
+++ b/main/squid/squid.initd
@@ -50,7 +50,7 @@ checkconfig() {
fi
done
- return 0
+ squid -k parse
}
get_pidfile() {
@@ -69,14 +69,19 @@ start() {
}
stop() {
- local rc=0
+ local rc=0 pid
ebegin "Stopping squid"
get_pidfile
/usr/sbin/squid -k shutdown
# Now we have to wait until squid has _really_ stopped.
if [ -f "$PIDFILE" ] ; then
- einfon "Waiting for squid to shutdown ."
+ pid=$(cat "$PIDFILE")
+ if [ -d /proc/$pid ]; then
+ einfon "Waiting for squid to shutdown ."
+ else
+ rm -f "$PIDFILE"
+ fi
cnt=0
while [ -f "$PIDFILE" ] ; do
cnt=$(expr $cnt + 1)