diff --git a/stop.sh b/stop.sh new file mode 100755 index 0000000..6ad31b2 --- /dev/null +++ b/stop.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +PID=$(pgrep -f "node src/index.js") + +if [ -z "$PID" ]; then + echo "服务未运行" + exit 1 +fi + +echo "停止服务 (PID: $PID)..." +kill $PID +echo "服务已停止" \ No newline at end of file