#!/bin/sh # # # PROVIDE: php-fcgi # REQUIRE: NETWORKING SERVERS # BEFORE: DAEMON # Add the following line(s) to /etc/rc.conf: # phpfcgi_enable (bool): Set to "NO" by default, set it to "YES" to enable php-fcgi . /etc/rc.subr name="phpfcgi" rcvar=`set_rcvar` command="/usr/local/sbin/php-fcgi" pidfile="/var/run/php-fcgi.pid" stop_cmd=phpfcgi_stop load_rc_config $name : ${phpfcgi_enable="NO"} phpfcgi_stop() { if [ -f ${pidfile} ] then echo "Stopping php-fcgi" ${command} -k fi } run_rc_command "$1"