Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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".)
Source by redsymbol.net #
 
PREVIOUS NEXT
Tagged: #services
ADD COMMENT
Topic
Name
7+2 =