aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lang/php70/files/php-fpm.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/lang/php70/files/php-fpm.in b/lang/php70/files/php-fpm.in
index 55e2ac992408..dfd243f88fad 100644
--- a/lang/php70/files/php-fpm.in
+++ b/lang/php70/files/php-fpm.in
@@ -17,11 +17,16 @@
name="php_fpm"
rcvar=php_fpm_enable
+start_precmd="php_fpm_checkconfig"
+restart_precmd="php_fpm_checkconfig"
+reload_precmd="php_fpm_checkconfig"
+configtest_cmd="php_fpm_checkconfig"
+
load_rc_config "$name"
: ${php_fpm_enable="NO"}
-extra_commands="reload logrotate"
+extra_commands="reload configtest logrotate"
command="%%PREFIX%%/sbin/php-fpm"
pidfile="/var/run/php-fpm.pid"
@@ -40,4 +45,10 @@ php_fpm_logrotate() {
kill -USR1 $rc_pid
}
+php_fpm_checkconfig()
+{
+ echo "Performing sanity check on php-fpm configuration:"
+ eval ${command} -t
+}
+
run_rc_command "$1"