aboutsummaryrefslogtreecommitdiff
path: root/lang/php70
diff options
context:
space:
mode:
authorGanbold Tsagaankhuu <ganbold@FreeBSD.org>2016-04-09 08:19:15 +0000
committerGanbold Tsagaankhuu <ganbold@FreeBSD.org>2016-04-09 08:19:15 +0000
commitea49acfce25d321a21db1eb5f24f17d5e3197708 (patch)
tree11d9a4a548e759de022c9b56a1ec70d2337a720f /lang/php70
parenteba5b9f8eedeb6e3f2eaeb3902b89dfeb21bda9d (diff)
downloadports-ea49acfce25d321a21db1eb5f24f17d5e3197708.tar.gz
ports-ea49acfce25d321a21db1eb5f24f17d5e3197708.zip
Add configtest support for php-fpm rc script.
PR: 208325 Submitted by: ganbold Approved by: miwi Sponsored by: A-Team Systems
Notes
Notes: svn path=/head/; revision=412802
Diffstat (limited to 'lang/php70')
-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"