commit: 26a7928561a2d06f3a5eab6824430bf59f11753c
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 25 01:43:54 2017 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Jul 25 01:43:54 2017 +0000
URL: https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=26a79285
Add comments to the php-fpm init script's start/stop_pre functions.
Had a mid-air collision with Brian there where we both tried to
implement exactly the same thing. I had some extra comments explaining
the RC_CMD tests that happily apply right on top of the last commit.
doc/php-fpm.example.init.in.in | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/doc/php-fpm.example.init.in.in b/doc/php-fpm.example.init.in.in
index 859ee5a..2eaa2c3 100644
--- a/doc/php-fpm.example.init.in.in
+++ b/doc/php-fpm.example.init.in.in
@@ -49,12 +49,21 @@ configtest() {
}
start_pre() {
+ # If this isn't a restart, make sure that the user's config isn't
+ # busted before we try to start the daemon (this will produce
+ # better error messages than if we just try to start it blindly).
+ #
+ # If, on the other hand, this *is* a restart, then the stop_pre
+ # action will have ensured that the config is usable and we don't
+ # need to do that again.
if [ "${RC_CMD}" != "restart" ] ; then
configtest || return $?
fi
}
stop_pre() {
+ # If this is a restart, check to make sure the user's config
+ # isn't busted before we stop the running daemon.
if [ "${RC_CMD}" = "restart" ] ; then
configtest || return $?
fi