Wenn ich meinen Befehl ausführe bekomme ich das heier aus:
Code
- mine@gmserver:/home/minecraft$ cd /home/minecraft && ./startserver restartb_off
- Stopping Minecraft Build Server./startserver: line 146: wait: pid 3 is not a child of this shell
- Stopping Minecraft RP Server./startserver: line 154: wait: pid 3 is not a child of this shell
- done.
- starting the Minecraft Build Server
- starting the Minecraft RP Server
done.
Das Script:
Code
- echo -n "Stopping $DESC1"
- screen -dr $NAME1 -X stuff "say Server will restart now. Please dissconnect!"
- screen -dr $NAME1 -X stuff $'\n'
- screen -dr $NAME1 -X stuff "save-all"
- screen -dr $NAME1 -X stuff $'\n'
- wait 3
- screen -r $NAME1 -X quit
- echo -n "Stopping $DESC2"
- screen -dr $NAME2 -X stuff "say Server will restart now. Please dissconnect!"
- screen -dr $NAME2 -X stuff $'\n'
- screen -dr $NAME2 -X stuff "save-all"
- screen -dr $NAME2 -X stuff $'\n'
- wait 3
- screen -r $NAME2 -X quit
- echo " done."
- $0 start1
- $0 start2
- exit 1