MCServer Autoupdate Script (for Linux)
#10
(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.

If you check the script, there is a part that closes the server. Here it is:
Quote:mc_stop() {
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
}
Reply
Thanks given by: tigerw


Messages In This Thread
RE: MCServer Autoupdate Script (for Linux) - by jimmis98 - 07-13-2013, 07:12 AM



Users browsing this thread: 8 Guest(s)