summaryrefslogtreecommitdiff
path: root/www/mongoose/files/mongoose.in
blob: b6070e5872163cd7b96430d2203a1bbbce22ab17 (plain) (blame)
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
39
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: mongoose
# REQUIRE: daemon

# Define these mongoose_* variables in one of these files:
#       /etc/rc.conf
#       /etc/rc.conf.local
#       /etc/rc.conf.d/mongoose
#
# mongoose_enable		Set to "YES" to run mongoose.
# mongoose_flags		Flags passed to mongoose, see mongoose --help

. /etc/rc.subr

name="mongoose"
rcvar=mongoose_enable
command="%%PREFIX%%/bin/mongoose"

#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
mongoose_enable=${mongoose_enable-"NO"}
mongoose_flags=${mongoose_flags-"/var/empty"}
mongoose_pidfile=${mongoose_pidfile-"/var/run/mongoose"}

start_cmd="mongoose_start"

load_rc_config $name

mongoose_start () {
	echo "Starting mongoose."
	/usr/sbin/daemon -p $mongoose_pidfile $command $mongoose_flags >/dev/null 2>&1
}

run_rc_command "$1"