]>
Commit | Line | Data |
---|---|---|
f4c3f459 AF |
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 | loadproc /usr/bin/motion | |
10 | ;; | |
11 | ||
12 | stop) | |
13 | boot_mesg "Stopping motion webcam server..." | |
14 | killproc /usr/bin/motion | |
15 | ;; | |
16 | ||
17 | restart) | |
18 | $0 stop | |
19 | sleep 1 | |
20 | $0 start | |
21 | ;; | |
22 | ||
23 | status) | |
24 | statusproc /usr/bin/motion | |
25 | ;; | |
26 | ||
27 | *) | |
28 | echo "Usage: $0 {start|stop|restart|status}" | |
29 | exit 1 | |
30 | ;; | |
31 | esac | |
32 | ||
33 | # End $rc_base/init.d/motion |