From owner-svn-ports-head@freebsd.org Sat Apr 9 08:19:17 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AD4BB095BC; Sat, 9 Apr 2016 08:19:17 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F10C316BF; Sat, 9 Apr 2016 08:19:16 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u398JGrA071754; Sat, 9 Apr 2016 08:19:16 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u398JG4u071753; Sat, 9 Apr 2016 08:19:16 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201604090819.u398JG4u071753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Sat, 9 Apr 2016 08:19:16 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r412802 - head/lang/php70/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Apr 2016 08:19:17 -0000 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"