]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
squid: Kill redirector processes only after squid has stopped
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 18 May 2016 15:16:12 +0000 (16:16 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 18 May 2016 15:16:12 +0000 (16:16 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/initscripts/init.d/squid

index ade9101a681027a5cc8fbae5678619095669f188..a2a26f22c3be638cd39cb719858e51be9f546ca0 100644 (file)
@@ -97,13 +97,6 @@ case "$1" in
                        boot_mesg -n "Stopping Squid Proxy Server (this may take up to a few minutes)..."
                        squid -k shutdown >/dev/null 2>&1
 
-                       # Stop squidGuard, updxlrator, squidclamav
-                       # and redirect_wrappers.
-                       killproc /usr/bin/squidGuard >/dev/null &
-                       killproc /usr/sbin/updxlrator >/dev/null &
-                       killproc /usr/bin/squidclamav >/dev/null &
-                       killproc /usr/sbin/redirect_wrapper >/dev/null &
-
                        # If some squid processes are still running, wait up to 360 seconds
                        # before we go on to kill the remaining process(es) and delete damaged
                        # '/var/log/cache/swap.state'.
@@ -136,6 +129,13 @@ case "$1" in
 
                                echo_ok
                        fi
+
+                       # Kill any redirector processes that might have been left running
+                       killproc /usr/bin/squidGuard >/dev/null &
+                       killproc /usr/sbin/updxlrator >/dev/null &
+                       killproc /usr/bin/squidclamav >/dev/null &
+                       killproc /usr/sbin/redirect_wrapper >/dev/null &
+                       wait
                fi
 
                # Trash remain pid file from squid.