aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorganbold <ganbold@FreeBSD.org>2016-04-09 16:19:15 +0800
committerganbold <ganbold@FreeBSD.org>2016-04-09 16:19:15 +0800
commite2377f6ffad7784478e3b23a06c23d95ca38501c (patch)
tree11d9a4a548e759de022c9b56a1ec70d2337a720f
parent49fca71822a72b0526395c3a924227ce0eb2f338 (diff)
downloadfreebsd-ports-gnome-e2377f6ffad7784478e3b23a06c23d95ca38501c.tar.gz
freebsd-ports-gnome-e2377f6ffad7784478e3b23a06c23d95ca38501c.tar.zst
freebsd-ports-gnome-e2377f6ffad7784478e3b23a06c23d95ca38501c.zip
Add configtest support for php-fpm rc script.
PR: 208325 Submitted by: ganbold Approved by: miwi Sponsored by: A-Team Systems
-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"