Initial commit

This commit is contained in:
Docker7530
2026-03-01 01:43:46 +08:00
commit c6125c117b
3840 changed files with 415340 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
```shell
#!/bin/bash
pids=$(pgrep -f "community_demo-0.0.1-SNAPSHOT.jar")
if [ -n "$pids" ]; then
echo "[INFO] Stopping old community_demo process(es): $pids"
kill -15 $pids
sleep 2
pids_again=$(pgrep -f "community_demo-0.0.1-SNAPSHOT.jar")
if [ -n "$pids_again" ]; then
echo "[WARN] Force killing process(es): $pids_again"
kill -9 $pids_again
fi
fi
SCRIPTDIR="$( cd "$( dirname "$0" )" && pwd )"
echo "[INFO] Script directory: $SCRIPTDIR"
echo "[INFO] Starting new community_demo process..."
nohup java -jar /opt/community/community_demo-0.0.1-SNAPSHOT.jar >> /opt/community/logs/nohup.log 2>&1 &
echo "[INFO] Process started with PID: $!"
tail -f /opt/community/logs/nohup.log
```