config/agileboot-api/stop.sh

12 lines
296 B
Bash
Raw Permalink Normal View History

2025-05-08 14:58:49 +08:00
#!/bin/sh
AppName=agileboot-api.jar
APP_HOME=$(cd $(dirname $0); pwd)
JAR_PATH=$APP_HOME/lib/$AppName
PID=$(ps -ef | grep java | grep $JAR_PATH | grep -v grep | awk '{print $2}')
if [ -n "$PID" ]; then
kill -9 $PID
echo "Application stopped"
else
echo "Application is not running"
fi