#!/bin/sh
#
# motion.sh for rc.d usage 2006 Angel Carpintero 
#
# Add the following line in /etc/rc.conf to enable @PACKAGE_NAME@ at startup
#
# motion_enable="YES"
#

# PROVIDE: @PACKAGE_NAME@ 
# REQUIRE: DAEMON
# KEYWORD: shutdown

. /etc/rc.subr

motion_enable="${motion_enable-NO}"

name="@PACKAGE_NAME@"
rcvar=`set_rcvar`

command="@BIN_PATH@/${name}"
pidfile="/var/run/${name}.pid"
required_files="/usr/local/etc/motion/${name}.conf"

load_rc_config $name
run_rc_command "$1"
