(07-13-2013, 05:27 AM)xoft Wrote: You don't need to extract the config files, just instruct your unzipping program to extract only the binary.
It works!
(07-13-2013, 07:12 AM)jimmis98 Wrote:(07-13-2013, 02:11 AM)tigerw Wrote:(07-13-2013, 01:54 AM)jimmis98 Wrote: I think that this could be of some help.
Nah, that's the vanilla server. It generates its config files, but the configuration for MCServer comes with the package. That is why it's frustrating, because with every new update, the old configs are overwritten.
But if you check the script, there is a part that closes the server. Here it is:
Quote:mc_stop() {I haven't tested if it works with MCServer though...
if pgrep -u $USERNAME -f $SERVICE > /dev/null
then
echo "Stopping $SERVICE"
as_user "screen -p 0 -S minecraft -X eval 'stuff \"say SERVER SHUTTING DOWN IN 10 SECONDS. Saving map...\"\015'"
as_user "screen -p 0 -S minecraft -X eval 'stuff \"save-all\"\015'"
sleep 10
as_user "screen -p 0 -S minecraft -X eval 'stuff \"stop\"\015'"
sleep 7
else
echo "$SERVICE was not running."
fi
if pgrep -u $USERNAME -f $SERVICE > /dev/null
then
echo "Error! $SERVICE could not be stopped."
else
echo "$SERVICE is stopped."
fi
}
I managed to condense it quite a bit, so the script gracefully stops it now. Yay!
To xoft:
MCServer does capture and tie up SIGTERM right? So it stops gracefully?