updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / cable-scripts / cable
blob1d0295510cb5592a48e959b7d444008a0f8e002b
1 #!/bin/sh
3 # /etc/rc.d/cable
6 . /etc/rc.conf
7 . /etc/rc.d/functions
9 case "$1" in
10 start)
11 stat_busy "Starting cable script"
13 cable-start > /dev/null 2>&1
15 if [ $? -gt 0 ]; then
16 stat_fail
17 cable-stop > /dev/null 2>&1
18 else
19 sh /etc/rc.d/cable-guard &
20 add_daemon cable
21 stat_done
25 stop)
26 stat_busy "Stopping cable script"
27 kill -9 `ps ax|grep cable-guard|grep -v grep|awk '{print $1;}'` > /dev/null 2>&1
28 cable-stop > /dev/null 2>&1
29 if [ $? -gt 0 ]; then
30 stat_fail
31 else
32 rm_daemon cable
33 stat_done
37 restart)
38 $0 stop
39 sleep 2
40 $0 start
43 status)
44 cable-status
47 setup)
48 cable-setup
53 echo $"Usage: $0 {start|stop|restart|status|setup}"
55 esac