2015-03-31 16:39:17 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-02-17 10:12:03 +01:00
|
|
|
MINISATIP_PROGRAM=minisatip
|
|
|
|
MINISATIP5_PROGRAM=minisatip5
|
2015-03-31 16:39:17 +02:00
|
|
|
test -r /etc/sysconfig/config && . /etc/sysconfig/config
|
|
|
|
|
2016-02-16 16:46:40 +01:00
|
|
|
if test "$MINISATIP" != "yes" -a "$MINISATIP5" != "yes"; then
|
2015-03-31 16:39:17 +02:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2015-04-20 15:43:32 +02:00
|
|
|
. /etc/init.d/axe-settings
|
|
|
|
|
2015-04-14 09:27:46 +02:00
|
|
|
# renice kernel demuxers
|
2015-04-20 15:43:32 +02:00
|
|
|
if test "$DEMUXERS_RENICE" = "yes"; then
|
|
|
|
a=""
|
|
|
|
for i in $(ps -o pid,nice,comm | grep "kdmxts_64" | cut -d 'k' -f 1); do
|
|
|
|
if test "$i" -gt 15; then a="$a $i"; fi
|
|
|
|
done
|
|
|
|
renice -15 $a
|
|
|
|
fi
|
2015-04-14 09:27:46 +02:00
|
|
|
|
2015-03-31 16:39:17 +02:00
|
|
|
cd /tmp
|
2015-04-03 12:37:24 +02:00
|
|
|
while test ! -f /tmp/nosatip; do
|
2015-04-09 09:53:52 +02:00
|
|
|
while ! test -r /tmp/satip-network; do
|
|
|
|
nc -l 127.0.0.1:999 -e /etc/init.d/satip-network
|
|
|
|
done
|
2016-02-17 10:12:03 +01:00
|
|
|
MINISATIP_PROGRAM=minisatip
|
|
|
|
MINISATIP5_PROGRAM=minisatip5
|
2015-04-10 15:08:02 +02:00
|
|
|
. /etc/sysconfig/config
|
2016-02-16 16:46:40 +01:00
|
|
|
if test "$MINISATIP" = "yes"; then
|
2016-02-17 10:12:03 +01:00
|
|
|
nice -5 $MINISATIP_PROGRAM -f -g $MINISATIP_OPTS
|
2016-02-16 16:46:40 +01:00
|
|
|
logger -p local0.notice "minisatip exited $?, restarting"
|
|
|
|
elif test "$MINISATIP5" = "yes"; then
|
2016-02-17 10:12:03 +01:00
|
|
|
nice -5 $MINISATIP5_PROGRAM -f -g $MINISATIP5_OPTS
|
2016-02-16 16:46:40 +01:00
|
|
|
logger -p local0.notice "minisatip5 exited $?, restarting"
|
|
|
|
else
|
|
|
|
exit 0
|
|
|
|
fi
|
2015-04-20 15:43:32 +02:00
|
|
|
if test -f /tmp/nosatip; then
|
|
|
|
sleep 87323123
|
|
|
|
fi
|
2015-03-31 16:39:17 +02:00
|
|
|
done
|