ustvgo-iptv icon indicating copy to clipboard operation
ustvgo-iptv copied to clipboard

sysvinit script for non systemd system's

Open nater1983 opened this issue 2 years ago • 2 comments

#!/bin/bash 
NAME=ustvgo-iptv
host=$(hostname -s)
start() {
echo "Starting IPTV Services: "
        $NAME > /dev/null 2>&1 &
}

stop() {
echo "Stopping IPTV Services: "
#Find the Process ID for ustvgo-iptv running instance
ps -ef | grep ustvgo-iptv | grep -v grep | awk '{print $2}' | xargs kill
}

restart() {
  stop
  sleep 3
  start
}

case "$1" in
    start)   start ;;
    stop)    stop ;;
    restart) stop; start ;;
    *) echo "usage: $0 start|stop|restart" >&2
       exit 1
       ;;
esac

nater1983 avatar Nov 13 '22 22:11 nater1983

Hi, there are some Linux distros that uses init rather than systemd as its process manager. I'll think about including init script in the next releases along systemd, thanks.

interlark avatar Nov 14 '22 03:11 interlark

You are welcome

nater1983 avatar Nov 14 '22 04:11 nater1983