30 lines
568 B
Bash
30 lines
568 B
Bash
#!/bin/ksh
|
|
daemon="plackup"
|
|
daemon_user="www"
|
|
|
|
dexter_script_path="/var/www/cgi-bin/dexter/app/dexter.pl"
|
|
dexter_socket_path="/var/www/run/dexter.sock"
|
|
dexter_psgi_mode="production"
|
|
|
|
. /etc/rc.d/rc.subr
|
|
|
|
rc_start() {
|
|
. /etc/dexter.conf
|
|
rc_exec "${daemon} ${script_path} -s FCGI -l ${socket_path} -E ${dexter_psgi_mode} -D"
|
|
}
|
|
|
|
rc_stop() {
|
|
pkill -f "perl-fcgi" -SIGTERM
|
|
}
|
|
|
|
rc_check() {
|
|
pgrep -q -f "perl-fcgi"
|
|
}
|
|
|
|
rc_configtest() {
|
|
# use rc_exec here since daemon_flags may contain arguments with spaces
|
|
rc_exec "/bin/ksh -n /etc/dexter.conf"
|
|
}
|
|
|
|
rc_cmd $1
|