Answers for "keep services up 2"

0

keep services up 2

function finish {
    # re-start service
    sudo service mongdb start
}
trap finish EXIT
# Stop the mongod instance
sudo service mongdb stop
# (If mongod is configured to fork, e.g. as part of a replica set, you
# may instead need to do "sudo killall --wait /usr/bin/mongod".)
Posted by: Guest on September-23-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language