mirror of
https://github.com/eliasstepanik/ark-ac-server-tools.git
synced 2026-01-26 08:18:27 +00:00
Properly closes the active screen session and the process inside it when the stop function is called.
This commit is contained in:
parent
1086d21098
commit
529576e6fa
@ -57,8 +57,7 @@ doStart() {
|
|||||||
doStop() {
|
doStop() {
|
||||||
read -p "This operation will quit the server without saving, are your really sure?" -n 1 -r
|
read -p "This operation will quit the server without saving, are your really sure?" -n 1 -r
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
screen -S "$servicename" -p 0 -X stuff "quit$(printf \\r)"
|
screen -X -S "$servicename" stuff "^C"
|
||||||
# screen -S "$servicename" -X quit
|
|
||||||
sleep 30
|
sleep 30
|
||||||
echo "$timestamp: stop" >> "$logdir/arkserver.log"
|
echo "$timestamp: stop" >> "$logdir/arkserver.log"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user