Posts: 952
Threads: 16
Joined: May 2013
Thanks: 66
Given 105 thank(s) in 89 post(s)
07-12-2013, 09:18 PM
(This post was last modified: 07-24-2013, 11:49 PM by tigerw.)
Salutations!
Since updating whilst trying to preserve configuration and world is so tedious, for me anyway, I wrote a little updater script.
WARNING - Please manually backup your files first before testing this script. I cannot be blamed if it deletes your world!
INFORMATION - This script assumes your MCServer is in a directory called 'mcserver' and that you are currently one up from that directory. You can change the directory by editing the MCSDIR variable.
This script detects your platform, downloads the correct ball of tar from Bearbin's Automated Building Server, extracts, stops MCS, copies, and starts.
To use this script, make sure you are one up from you server folder, and enter the command:
Code: wget https://github.com/tigerw/MCServer-Autoupdate-Script/raw/master/updateserver.sh && bash updateserver.sh
To see the source code, visit the hub of gits page.
Near completely rewritten with 200% extra functionality, courtesy of the venerable and awesome Bearbin! Visit his hub of gits here.
Additional contributions stem from xoft and jimmis' recommendations. Your help was gratefully received!
Thanks for looking!
Posts: 1,162
Threads: 68
Joined: Mar 2013
Thanks: 245
Given 125 thank(s) in 100 post(s)
Good, a MCServer server. The only problem is that I use 1.5.2 because 1.6.2 is laggy
I hate new launcher.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
Oooh, a public MCServer server Cool!
Posts: 1,162
Threads: 68
Joined: Mar 2013
Thanks: 245
Given 125 thank(s) in 100 post(s)
07-12-2013, 10:00 PM
(This post was last modified: 07-12-2013, 10:02 PM by tonibm19.)
I just donwloaded 1.6.2 and now server is offline .
tigerw, please, can you set authentificate to 0?
You can use STR_Warrior Login plugin.
Posts: 952
Threads: 16
Joined: May 2013
Thanks: 66
Given 105 thank(s) in 89 post(s)
(07-12-2013, 10:00 PM)tonibm19 Wrote: I just donwloaded 1.6.2 and now server is offline .
tigerw, please, can you set authentificate to 0?
You can use STR_Warrior Login plugin.
Hello! Switched off authentication. Do you not have an account for MC?
Posts: 1,162
Threads: 68
Joined: Mar 2013
Thanks: 245
Given 125 thank(s) in 100 post(s)
07-12-2013, 11:56 PM
(This post was last modified: 07-12-2013, 11:58 PM by tonibm19.)
Thank you.
I haven't a minecraft account but I think I'll buy it in the future because I really like Minecraft. It only could be better if it were not written in java.
About your server, now I can't join, I'm not on the computer, but, is creative or survival?
Posts: 26
Threads: 8
Joined: Jun 2013
Thanks: 27
Given 3 thank(s) in 3 post(s)
I think that this could be of some help.
Posts: 952
Threads: 16
Joined: May 2013
Thanks: 66
Given 105 thank(s) in 89 post(s)
07-13-2013, 02:11 AM
(This post was last modified: 07-13-2013, 02:42 AM by tigerw.)
(07-12-2013, 11:56 PM)tonibm19 Wrote: Thank you.
I haven't a minecraft account but I think I'll buy it in the future because I really like Minecraft. It only could be better if it were not written in java.
About your server, now I can't join, I'm not on the computer, but, is creative or survival?
It's survival, but if you want creative mode, give me your username and I shall promote you to a higher rank.
(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.
Posts: 6,485
Threads: 176
Joined: Jan 2012
Thanks: 131
Given 1074 thank(s) in 852 post(s)
You don't need to extract the config files, just instruct your unzipping program to extract only the binary.
Posts: 26
Threads: 8
Joined: Jun 2013
Thanks: 27
Given 3 thank(s) in 3 post(s)
07-13-2013, 07:12 AM
(This post was last modified: 01-02-2017, 08:45 PM by jimmis98.)
(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
}
|