diff options
author | ganbold <ganbold@FreeBSD.org> | 2016-04-12 09:14:49 +0800 |
---|---|---|
committer | ganbold <ganbold@FreeBSD.org> | 2016-04-12 09:14:49 +0800 |
commit | 87c2747aa58663c8f031eef25ad445666c6fe602 (patch) | |
tree | a1c49da1ffa3979327748f7d5b825c4c2f92190c /lang/php56 | |
parent | e5140f798dca18b653e4e89149282a58e4437a94 (diff) | |
download | freebsd-ports-gnome-87c2747aa58663c8f031eef25ad445666c6fe602.tar.gz freebsd-ports-gnome-87c2747aa58663c8f031eef25ad445666c6fe602.tar.zst freebsd-ports-gnome-87c2747aa58663c8f031eef25ad445666c6fe602.zip |
Add configtest support for php-fpm rc script.
PR: 208324
Sponsored by: A-Team Systems
Diffstat (limited to 'lang/php56')
-rw-r--r-- | lang/php56/Makefile | 2 | ||||
-rw-r--r-- | lang/php56/files/php-fpm.in | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/lang/php56/Makefile b/lang/php56/Makefile index ac11008c6fba..e2243367837a 100644 --- a/lang/php56/Makefile +++ b/lang/php56/Makefile @@ -3,7 +3,7 @@ PORTNAME= php56 PORTVERSION= 5.6.20 -PORTREVISION?= 0 +PORTREVISION= 1 CATEGORIES?= lang devel www MASTER_SITES= PHP/distributions DISTNAME= php-${PORTVERSION} diff --git a/lang/php56/files/php-fpm.in b/lang/php56/files/php-fpm.in index 55e2ac992408..dfd243f88fad 100644 --- a/lang/php56/files/php-fpm.in +++ b/lang/php56/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" |