Shutdown from shell script
#1
I have a cron shell script that recompiles MCServer every night. How would I safely shutdown and/or restart MCServer from this script? (MCServer runs from screen)
Reply
Thanks given by:
#2
Use a RCON client to send it the "stop" command.
We have a RCONClient tool in the Tools folder, but I haven't compiled it for anything else than windows yet, so it might take some work.
Reply
Thanks given by:
#3
Code:
echo "stop" > /proc/?/fd/0

Maybe that would work?
Reply
Thanks given by:
#4
Might, but I'm running in a screen session so I used:
screen -S mcserver -p 0 -X stuff "stop$(printf \\r)"
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)