diff options
Diffstat (limited to 'main/squid/squid.initd')
-rw-r--r-- | main/squid/squid.initd | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/main/squid/squid.initd b/main/squid/squid.initd index beaea0b17..2eaf1dd2a 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) |