svn commit: r413091 - in head/lang/php56: . files

Ganbold Tsagaankhuu ganbold at FreeBSD.org
Tue Apr 12 01:14:51 UTC 2016


Author: ganbold (src,doc committer)
Date: Tue Apr 12 01:14:49 2016
New Revision: 413091
URL: https://svnweb.freebsd.org/changeset/ports/413091

Log:
  Add configtest support for php-fpm rc script.
  
  PR:	208324
  Sponsored by:	A-Team Systems

Modified:
  head/lang/php56/Makefile
  head/lang/php56/files/php-fpm.in

Modified: head/lang/php56/Makefile
==============================================================================
--- head/lang/php56/Makefile	Mon Apr 11 23:36:34 2016	(r413090)
+++ head/lang/php56/Makefile	Tue Apr 12 01:14:49 2016	(r413091)
@@ -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}

Modified: head/lang/php56/files/php-fpm.in
==============================================================================
--- head/lang/php56/files/php-fpm.in	Mon Apr 11 23:36:34 2016	(r413090)
+++ head/lang/php56/files/php-fpm.in	Tue Apr 12 01:14:49 2016	(r413091)
@@ -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"


More information about the svn-ports-all mailing list