Answers for "keep services up no matter what"

0

keep services up no matter what

function finish {
    # re-start service
    sudo /etc/init.d/something start
}
trap finish EXIT
sudo /etc/init.d/something stop
# Do the work...

# Allow the script to end and the trapped finish function to start the
# daemon back up.
Posted by: Guest on September-23-2021

Code answers related to "keep services up no matter what"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language