-
Notifications
You must be signed in to change notification settings - Fork 0
/
satip-client.sh
49 lines (44 loc) · 2.13 KB
/
satip-client.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
if ! [ -x /usr/bin/satip-client ]; then
exit 0
fi
. /etc/satip-client.conf
if [ "$DISABLED" = "yes" ]; then
echo "satip-client is not configured. Please edit /etc/satip-client.conf !"
exit 0
fi
case "$1" in
start)
if [ $SATIPSERVER0 ]; then
echo "Starting SAT>IP client on /dev/misc/vtuner0"
start-stop-daemon -S -b -p /var/run/satip-client0 -m -x /usr/bin/satip-client -- -s $SATIPSERVER0 -l$LOGLEVEL0 -t$FRONTENDTYPE0 -d /dev/misc/vtuner0 -w$WORKAROUND0 -y
fi
if [ $SATIPSERVER1 ]; then
echo "Starting SAT>IP client on /dev/misc/vtuner1"
start-stop-daemon -S -b -p /var/run/satip-client1 -m -x /usr/bin/satip-client -- -s $SATIPSERVER1 -l$LOGLEVEL1 -t$FRONTENDTYPE1 -d /dev/misc/vtuner1 -w$WORKAROUND1 -y
fi
if [ $SATIPSERVER2 ]; then
echo "Starting SAT>IP client on /dev/misc/vtuner2"
start-stop-daemon -S -b -p /var/run/satip-client2 -m -x /usr/bin/satip-client -- -s $SATIPSERVER2 -l$LOGLEVEL2 -t$FRONTENDTYPE2 -d /dev/misc/vtuner2 -w$WORKAROUND2 -y
fi
if [ $SATIPSERVER3 ]; then
echo "Starting SAT>IP client on /dev/misc/vtuner3"
start-stop-daemon -S -b -p /var/run/satip-client3 -m -x /usr/bin/satip-client -- -s $SATIPSERVER3 -l$LOGLEVEL3 -t$FRONTENDTYPE3 -d /dev/misc/vtuner3 -w$WORKAROUND3 -y
fi
;;
stop)
start-stop-daemon -K -p /var/run/satip-client0 /usr/bin/satip-client
start-stop-daemon -K -p /var/run/satip-client1 /usr/bin/satip-client
start-stop-daemon -K -p /var/run/satip-client2 /usr/bin/satip-client
start-stop-daemon -K -p /var/run/satip-client3 /usr/bin/satip-client
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
exit 0