mirror of
https://git.freebsd.org/ports.git
synced 2025-06-21 04:30:37 -04:00
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.
28 lines
931 B
Bash
28 lines
931 B
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: fcgi_spawn
|
|
# REQUIRE: LOGIN %%MYSQL%% %%PGSQL%%
|
|
# KEYWORD: shutdown
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="fcgi_spawn"
|
|
rcvar=fcgi_spawn_enable
|
|
|
|
fcgi_spawn_enable=${fcgi_spawn_enable:-"NO"}
|
|
pidfile=${fcgi_spawn_pid:-"/var/run/${name}.pid"}
|
|
|
|
load_rc_config ${name}
|
|
|
|
fcgi_spawn_config_path=${fcgi_spawn_config_path:-"/usr/local/etc/${name}"}
|
|
fcgi_spawn_log=${fcgi_spawn_log:-"/var/log/${name}.log"}
|
|
fcgi_spawn_socket_path=${fcgi_spawn_socket_path:-"/tmp/spawner.sock"}
|
|
fcgi_spawn_redefine_exit=${fcgi_spawn_redefine_exit:-"0"}
|
|
fcgi_spawn_username=${fcgi_spawn_username:-"fcgi"}
|
|
fcgi_spawn_groupname=${fcgi_spawn_groupname:-"fcgi"}
|
|
fcgi_spawn_flags=${fcgi_spawn_flags:-""}
|
|
command="%%PREFIX%%/bin/${name}"
|
|
command_args="-l ${fcgi_spawn_log} -p ${pidfile} -c ${fcgi_spawn_config_path} -u ${fcgi_spawn_username} -g ${fcgi_spawn_groupname} -s ${fcgi_spawn_socket_path}"
|
|
required_dirs=${fcgi_spawn_config_path}
|
|
|
|
run_rc_command "$1"
|