I am trying to create a bash utility script to check if a docker daemon is running in my server. Is there a better way of checking if the docker daemon is running in my serv
A function could looks so:
isRunning { `ps -ef | grep "[d]ocker" | awk {'print $2'}` }
I created a script to start, stop, restart a mongodb-server. You only need to change some path inside the scripts, and i also works for you: Script