literal name_enable wherever possible, and ${name}_enable when it's not, to prepare for the demise of set_rcvar(). In cases where I had to hand-edit unusual instances also modify formatting slightly to be more uniform (and in some cases, correct). This includes adding some $FreeBSD$ tags, and most importantly moving rcvar= to right after name= so it's clear that one is derived from the other.
34 lines
576 B
Bash
34 lines
576 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: php_fcgi
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
# Add the following line(s) to /etc/rc.conf:
|
|
# php_fcgi_enable (bool): Set to "NO" by default, set it
|
|
# to "YES" to enable php_fcgi.
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="php_fcgi"
|
|
rcvar=php_fcgi_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${php_fcgi_enable="NO"}
|
|
|
|
command="%%PREFIX%%/sbin/php-fcgi"
|
|
pidfile=${php_fcgi_pidfile="/var/run/php-fcgi.pid"}
|
|
procname=${php_fcgi_app="%%LOCALBASE%%/bin/php-cgi"}
|
|
|
|
stop_postcmd="${name}_stop_postcmd"
|
|
|
|
php_fcgi_stop_postcmd()
|
|
{
|
|
rm -f ${pidfile}
|
|
}
|
|
|
|
run_rc_command "$1"
|