diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2017-07-24 21:43:54 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2017-07-24 21:43:54 -0400 |
commit | 26a7928561a2d06f3a5eab6824430bf59f11753c (patch) | |
tree | 6fd877f2695bcd78454e4fce555102a5b0310833 | |
parent | Don't allow restart with a bad config (diff) | |
download | eselect-php-26a7928561a2d06f3a5eab6824430bf59f11753c.tar.gz eselect-php-26a7928561a2d06f3a5eab6824430bf59f11753c.tar.bz2 eselect-php-26a7928561a2d06f3a5eab6824430bf59f11753c.zip |
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.
-rw-r--r-- | doc/php-fpm.example.init.in.in | 9 |
1 files changed, 9 insertions, 0 deletions
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 |