]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
initscripts: Correctly wait for Apache2 to terminate
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Apr 2024 15:28:38 +0000 (15:28 +0000)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 28 Apr 2024 17:23:41 +0000 (17:23 +0000)
This is achieved by telling killproc which PIDs to wait for.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
src/initscripts/system/apache

index 18eb86e2f6e5c3722adf386ab8ec3b66e65c7f15..e7a62097e1b1832d910e4307f4b285d1438326c3 100644 (file)
@@ -22,6 +22,8 @@
 . /etc/sysconfig/rc
 . $rc_functions
 
+PIDFILE="/var/run/httpd.pid"
+
 generate_certificates() {
        if [ ! -f "/etc/httpd/server.key" ]; then
                boot_mesg "Generating HTTPS RSA server key (this will take a moment)..."
@@ -86,8 +88,7 @@ case "$1" in
 
        stop)
                boot_mesg "Stopping Apache daemon..."
-               /usr/sbin/apachectl -k stop
-               evaluate_retval
+               killproc /usr/sbin/httpd
                ;;
 
        restart)