diff options
-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 |