blob: 496a27d98218af903587c1960551eee205d081c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#! /bin/sh
#
# $FreeBSD$
#
# PROVIDE: mwqserve
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable mwqserve:
#
#mwqserve_enable="YES"
. /etc/rc.subr
name="mwqserve"
rcvar="mwqserve_enable"
load_rc_config $name
: ${mwqserve_user:=www}
: ${mwqserve_group:=www}
: ${mwqserve_enable:=NO}
pidfile="/var/run/${name}.pid"
command="/usr/sbin/daemon"
command_args="-c -f -p ${pidfile} %%PREFIX%%/bin/mw-qserve ${mwqserve_args}"
command_interpreter="%%PYTHON_CMD%%"
procname="%%PREFIX%%/bin/mw-qserve"
start_precmd=mwqserve_pre_start
mwqserve_pre_start() {
/usr/bin/install -o ${mwqserve_user} -g ${mwqserve_group} -m 644 /dev/null ${pidfile}
}
run_rc_command "$1"
|