Motion tuning (don't run as root, backup include, config...)
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / motion
1 #!/bin/sh
2
3 . /etc/sysconfig/rc
4 . $rc_functions
5
6 case "$1" in
7 start)
8 boot_mesg "Starting motion webcam server..."
9 chown :video /dev/video*
10 mkdir -p /var/motion/cam1
11 chown -R video: /var/motion/cam1
12 loadproc sudo -u video /usr/bin/motion
13 ;;
14
15 stop)
16 boot_mesg "Stopping motion webcam server..."
17 killproc /usr/bin/motion
18 ;;
19
20 restart)
21 $0 stop
22 sleep 1
23 $0 start
24 ;;
25
26 status)
27 statusproc /usr/bin/motion
28 ;;
29
30 *)
31 echo "Usage: $0 {start|stop|restart|status}"
32 exit 1
33 ;;
34 esac
35
36 # End $rc_base/init.d/motion