Date: Fri, 21 Feb 2025 15:50:03 +0000 From: bugzilla-noreply@freebsd.org To: apache@FreeBSD.org Subject: maintainer-feedback requested: [Bug 284950] www/apache24: Behavior of config checks in rc-script Message-ID: <bug-284950-16115-N0n5HJbdV2@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-284950-16115@https.bugs.freebsd.org/bugzilla/> References: <bug-284950-16115@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-apache (Nobody) <apache@FreeBSD.org> for maintainer-feedback: Bug 284950: www/apache24: Behavior of config checks in rc-script https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284950 --- Description --- I noticed that if you use the reload command of the rc-script, the apache config will be checked twice. Once because the reload_precmd is set to apache24_checkconfig and the reload function itself calls the apache24_checkconfig function. Because of this, i looked closer at the rc-script and found some other weird behaviors. - For the commands start, reload, graceful and gracefulstop the function apache24_checkconfig is called, but the result is not used at all and the script continues executing, even if the config is invalid - The command reload and graceful do the same thing, except reload does check the config twice. - The restart command does check the config also twice (Once before stopping apache and once before starting apache) The attached patch does fix some of these points. - The result of apache24_checkconfig will be checked and the command will abort if there is an invalid config - reload_precmd is removed. The config will be checked once for a reload. The behavior of reload and graceful is the same It would be nice, if the restart command does only check the config once, before stopping apache. But I don't have much experience with rc-scripts, so I'm unsure of the best approach to take.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-284950-16115-N0n5HJbdV2>
