Permalink
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (9 sloc) 322 Bytes
# Ignore any errors on exit
set +e
if zookeepercli -servers "${ZKURL}" -c get /nodes/$(hostname) &>/dev/null
then
zookeepercli -servers "${ZKURL}" -c rm /nodes/$(hostname)
log "$(hostname) has been unregistered at ${ZKURL}"
fi
# Ignoring exit status 130 (after pressing Ctrl+C) by finishing with status 0
exit 0