From patchwork Mon Nov 27 11:25:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 7360 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Sf3DJ0jyXz3wtp for ; Mon, 27 Nov 2023 11:25:36 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Sf3DD0TSLz148; Mon, 27 Nov 2023 11:25:32 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Sf3DC34WLz30J8; Mon, 27 Nov 2023 11:25:31 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Sf3D85wWLz300n for ; Mon, 27 Nov 2023 11:25:28 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "michael.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Sf3D82Dj7zXX; Mon, 27 Nov 2023 11:25:28 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4Sf3D80p34zTgD3; Mon, 27 Nov 2023 11:25:28 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH] apache2: Properly re-execute Apache on restart Date: Mon, 27 Nov 2023 11:25:25 +0000 Message-Id: <20231127112525.132799-1-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Message-ID-Hash: F7GAZIXNO6P3X4QFF7VJWU6E2ZU7JYGB X-Message-ID-Hash: F7GAZIXNO6P3X4QFF7VJWU6E2ZU7JYGB X-MailFrom: root@michael.haj.ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Michael Tremer X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Previously, we sent Apache a signal to relaunch itself which caused Apache to kill all child processes, and re-execute them. However, when updating glibc, any newly compiled modules could not be loaded as Apache was running with the previous version of glibc until the next reboot. This change will now properly stop Apache and restart it which solves this problem. Signed-off-by: Michael Tremer --- src/initscripts/system/apache | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/initscripts/system/apache b/src/initscripts/system/apache index 0f4fe4a71..18eb86e2f 100644 --- a/src/initscripts/system/apache +++ b/src/initscripts/system/apache @@ -86,14 +86,13 @@ case "$1" in stop) boot_mesg "Stopping Apache daemon..." - killproc /usr/sbin/httpd + /usr/sbin/apachectl -k stop evaluate_retval ;; restart) - boot_mesg "Restarting Apache daemon..." - /usr/sbin/apachectl -k restart - evaluate_retval + $0 stop + $0 start ;; reload)