9 if ! docker ps --filter "name=^/${MS}" | grep -q "${MS}"; then
10 echo "${MS} is already stopped, ignore the action."
12 echo "Executing 'docker stop ${MS}'"
19 if docker ps --filter "name=^/${MS}" | grep -q "${MS}"; then
20 echo "${MS} is running, performing restart."
21 echo "Executing \'\docker stop ${MS}'"
22 docker stop ${MS} && sleep 2
23 echo "Executing 'docker start ${MS}'"
26 echo "Executing 'docker start ${MS}'"
34 out=$(docker ps --filter "name=^/${MS}" | grep "${MS}")
36 if [ "$res" == "0" ]; then
38 echo "The ${MS} is currnetly up & running!"
40 echo "The ${MS} is currnetly not running!"