Skip to content

Instantly share code, notes, and snippets.

@btisdall
Created April 29, 2014 16:43
Show Gist options
  • Save btisdall/11405720 to your computer and use it in GitHub Desktop.
Save btisdall/11405720 to your computer and use it in GitHub Desktop.
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
set +e
if [ -f "$CATALINA_PID" ]; then
start-stop-daemon --stop --pidfile "$CATALINA_PID" \
--user "$TOMCAT7_USER" \
--retry=TERM/20/KILL/5 >/dev/null
if [ $? -eq 1 ]; then
log_progress_msg "$DESC is not running but pid file exists, cleaning up"
elif [ $? -eq 3 ]; then
PID="`cat $CATALINA_PID`"
log_failure_msg "Failed to stop $NAME (pid $PID)"
exit 1
fi
rm -f "$CATALINA_PID"
rm -rf "$JVM_TMP"
else
log_progress_msg "(not running)"
fi
log_end_msg 0
set -e
;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment