Commit 72e8cb67 by Chavee Issariyapat

do not check pid when leaving cluster

parent e5faebb8
......@@ -122,12 +122,13 @@ siguser1_handler() {
# SIGTERM-handler
sigterm_handler() {
echo "Stopping VerneMQ Pod... VerneMQ@${IP_ADDRESS} "
if [[ $pid -ne 0 ]]; then
echo "VerneMQ PID = ${pid}"
#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
}
......@@ -150,5 +151,5 @@ touch /var/log/vernemq/console.log
while true
do
tail -f /var/log/vernemq/console.log & wait ${!}
done
done
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