Init Scripts
#!/bin/sh
# chkconfig: 345 15 85
# description: Startup and shutdown script.
MOTION_DIR=/usr/bin/
export MOTION_DIR
case $1 in
'start' )
"$MOTION_DIR/motion &"
;;
'stop' )
killall -9 motion
rm $MOTION_DIR/motion.pid
;;
*)
echo "usage: `basename $0` {start|stop}"
esac