2011-04-29 16:22:37 +02:00
|
|
|
#!/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"
|
2011-07-05 23:53:40 +02:00
|
|
|
status_cmd="zm_status"
|
2011-04-29 16:22:37 +02:00
|
|
|
|
|
|
|
load_rc_config "$name"
|
|
|
|
: ${zm_enable="NO"}
|
|
|
|
|
|
|
|
zm_stop() {
|
|
|
|
${command} ${command_args}
|
|
|
|
}
|
|
|
|
|
2011-07-05 23:53:40 +02:00
|
|
|
zm_status() (
|
|
|
|
%%PREFIX%%/bin/${name}dc.pl status
|
|
|
|
)
|
|
|
|
|
2011-04-29 16:22:37 +02:00
|
|
|
sleep 10
|
|
|
|
|
|
|
|
run_rc_command "$1"
|