Sample Header Ad - 728x90

Debian start-stop-daemon equivalent in CentOS

1 vote
1 answer
5962 views
I have a bash script that is written in a debian-based distribution (System-V) and I want to run it under CentOS 7. There is a part of the script that runs a command as a daemon like this: start-stop-daemon --start --pidfile $PIDFILE \ --chdir "$DIR" --startas $PROGRAM --name foo --chuid "$USER" -- $ARGS And stops the daemon like this: start-stop-daemon --stop --quiet --pidfile $PID \ --user "$USER" --name foo --retry=TERM/30/KILL/5 My question is how do something equivalent in CentOS 7? Is the daemon function in /etc/init.d/functions an alternative?
Asked by 3bdalla (441 rep)
Oct 3, 2018, 12:07 PM
Last activity: Oct 3, 2018, 01:36 PM