Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Apr 2016 08:19:16 +0000 (UTC)
From:      Ganbold Tsagaankhuu <ganbold@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r412802 - head/lang/php70/files
Message-ID:  <201604090819.u398JG4u071753@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ganbold (src,doc committer)
Date: Sat Apr  9 08:19:15 2016
New Revision: 412802
URL: https://svnweb.freebsd.org/changeset/ports/412802

Log:
  Add configtest support for php-fpm rc script.
  
  PR:     208325
  Submitted by:   ganbold
  Approved by:    miwi
  Sponsored by:   A-Team Systems

Modified:
  head/lang/php70/files/php-fpm.in

Modified: head/lang/php70/files/php-fpm.in
==============================================================================
--- head/lang/php70/files/php-fpm.in	Sat Apr  9 08:19:15 2016	(r412801)
+++ head/lang/php70/files/php-fpm.in	Sat Apr  9 08:19:15 2016	(r412802)
@@ -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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604090819.u398JG4u071753>