Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysvinit script for non systemd system's #50

Open
nater1983 opened this issue Nov 13, 2022 · 2 comments
Open

sysvinit script for non systemd system's #50

nater1983 opened this issue Nov 13, 2022 · 2 comments

Comments

@nater1983
Copy link

#!/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
@interlark
Copy link
Owner

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.

@nater1983
Copy link
Author

You are welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants