blob: 0956c65662e403b297369b59cb63c7f40d80366c (
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
40
41
42
43
44
|
#!/bin/sh
# $FreeBSD$
# PROVIDE: zoneminder
# REQUIRE: mysql apache
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# zm_enable (bool): Set to NO by default.
# Set it to YES to enable zoneminder.
#
. /etc/rc.subr
name="zm"
rcvar=${name}_enable
command=%%PREFIX%%/bin/${name}pkg.pl
command_args="$1"
pidfile=/var/run/${name}/${name}.pid
load_rc_config "$name"
: ${zm_enable="NO"}
stop_cmd="zm_stop"
status_cmd="zm_status"
load_rc_config "$name"
: ${zm_enable="NO"}
zm_stop() {
${command} ${command_args}
}
zm_status() (
%%PREFIX%%/bin/${name}dc.pl status
)
sleep 10
run_rc_command "$1"
|