mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-06 01:06:39 +00:00
feat(打包改为分包): 打包改为分包
This commit is contained in:
33
novel-crawl/src/main/build/scripts/stop.sh
Normal file
33
novel-crawl/src/main/build/scripts/stop.sh
Normal file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
SERVER_NAME=novel-crawl.jar
|
||||
|
||||
#应用进程
|
||||
PIDS=`ps -ef | grep java | grep "$SERVER_NAME" |awk '{print $2}'`
|
||||
if [ -z "$PIDS" ]; then
|
||||
echo "ERROR: The $SERVER_NAME does not started!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "Stopping the $SERVER_NAME ...\c"
|
||||
for PID in $PIDS ; do
|
||||
kill $PID > /dev/null 2>&1
|
||||
done
|
||||
|
||||
COUNT=0
|
||||
while [ $COUNT -lt 1 ]; do
|
||||
echo -e ".\c"
|
||||
sleep 1
|
||||
COUNT=1
|
||||
for PID in $PIDS ; do
|
||||
PID_EXIST=`ps -f -p $PID | grep java`
|
||||
if [ -n "$PID_EXIST" ]; then
|
||||
COUNT=0
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
echo "OK!"
|
||||
echo "PID: $PIDS"
|
||||
PIDS=""
|
||||
|
Reference in New Issue
Block a user