Commit da9eeb73 by Chavee Issariyapat

fix bug in conditional script

parent 2e5e2c15
......@@ -122,12 +122,12 @@ siguser1_handler() {
# SIGTERM-handler
sigterm_handler() {
echo "Stopping VerneMQ Pod... VerneMQ@${IP_ADDRESS} "
#if [ $pid -ne 0 ]; then
if [[ $pid -ne 0 ]]; then
echo "Leaving cluster..."
# this will stop the VerneMQ process
vmq-admin cluster leave node=VerneMQ@$IP_ADDRESS -k > /dev/null
wait "$pid"
#fi
fi
exit 143; # 128 + 15 -- SIGTERM
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment