services.hazelcast-all.1.0.2.0-jre13.source-code.stop.sh Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hazelcast-all Show documentation
Show all versions of hazelcast-all Show documentation
Kubernetes Service Discovery for Hazelcast Discovery SPI
#!/bin/sh
PRG="$0"
PRGDIR=`dirname "$PRG"`
HAZELCAST_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
PID_FILE="${HAZELCAST_HOME}"/bin/hazelcast_instance.pid
if [ ! -f "${PID_FILE}" ]; then
echo "No hazelcast instance is running."
exit 0
fi
PID=$(cat "${PID_FILE}");
if [ -z "${PID}" ]; then
echo "No hazelcast instance is running."
exit 0
else
kill -15 "${PID}"
rm "${PID_FILE}"
echo "Hazelcast Instance with PID ${PID} shutdown."
exit 0
fi