satip-axe/fs-add/etc/init.d/satip

53 lines
1.5 KiB
Plaintext
Raw Normal View History

#!/bin/sh
2016-02-17 10:12:03 +01:00
MINISATIP_PROGRAM=minisatip
MINISATIP5_PROGRAM=minisatip5
2017-04-25 13:06:33 +02:00
MINISATIP7_PROGRAM=minisatip7
MINISATIP8_PROGRAM=minisatip8
test -r /etc/sysconfig/config && . /etc/sysconfig/config
if test "$MINISATIP" != "yes" -a "$MINISATIP5" != "yes" -a "$MINISATIP7" != "yes" -a "$MINISATIP8" != "yes"; then
exit 0
fi
. /etc/init.d/axe-settings
# renice kernel demuxers
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
cd /tmp
while test ! -f /tmp/nosatip; do
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
2017-04-25 13:06:33 +02:00
MINISATIP7_PROGRAM=minisatip7
MINISATIP8_PROGRAM=minisatip8
. /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"
2017-04-25 13:06:33 +02:00
elif test "$MINISATIP7" = "yes"; then
nice -5 $MINISATIP7_PROGRAM -f -g $MINISATIP7_OPTS
logger -p local0.notice "minisatip7 exited $?, restarting"
elif test "$MINISATIP8" = "yes"; then
nice -5 $MINISATIP8_PROGRAM -f -g $MINISATIP8_OPTS
logger -p local0.notice "minisatip8 exited $?, restarting"
2016-02-16 16:46:40 +01:00
else
exit 0
fi
if test -f /tmp/nosatip; then
sleep 87323123
fi
done