Commit 2e5e2c15 by Chavee Issariyapat

fix pid problem in vernemq.sh

parent 4b7b5150
...@@ -122,12 +122,12 @@ siguser1_handler() { ...@@ -122,12 +122,12 @@ siguser1_handler() {
# SIGTERM-handler # SIGTERM-handler
sigterm_handler() { sigterm_handler() {
echo "Stopping VerneMQ Pod... VerneMQ@${IP_ADDRESS} " echo "Stopping VerneMQ Pod... VerneMQ@${IP_ADDRESS} "
if [ $pid -ne 0 ]; then #if [ $pid -ne 0 ]; then
echo "Leaving cluster..." echo "Leaving cluster..."
# this will stop the VerneMQ process # this will stop the VerneMQ process
vmq-admin cluster leave node=VerneMQ@$IP_ADDRESS -k > /dev/null vmq-admin cluster leave node=VerneMQ@$IP_ADDRESS -k > /dev/null
wait "$pid" wait "$pid"
fi #fi
exit 143; # 128 + 15 -- SIGTERM 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