Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tplavcic committed Jun 30, 2017
1 parent 39cf9a6 commit ed2e4aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions check_running.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ log="/tmp/${product}_check_running.log"
echo -n > ${log}

if [ ${product} = "mysql" ]; then
process="mysqld"
process="bin/mysqld"
elif [ ${product} = "mongodb" ]; then
process="mongod"
process="bin/mongod"
elif [ ${product} = "proxysql" ]; then
process="proxysql"
process="bin/proxysql"
else
echo "Unknown product!"
exit 1
fi

ps aux >> ${log}
psoutput=$(ps aux | grep -v grep | grep -c "${process}")
psoutput=$(ps aux | grep -v "grep" | grep -v "check_running.sh" | grep -c "${process}")
echo ${psoutput}

if [ ${psoutput} -eq 0 -a ${status} = "stopped" ]; then
Expand Down

0 comments on commit ed2e4aa

Please sign in to comment.