Following up with the initial beta 3 setup of the trackmania 2 dedicated server, now it’s time to upgrade to beta 4.
First, download the new dedicated server version from maniaplanet forum.
$ sudo su - tm2 $ mkdir TM2_new $ cd TM2_new ; wget http://files.maniaplanet.com/beta4/ManiaPlanetDedicated_2011-09-05.zip ; unzip ManiaPlanetDedicated_2011-09-05.zip ; cd ..
Now it’s time to diff the changes.
$ diff -ur TM2 TM2_new
You will see that our changes from the past guide would be overriden, so make sure that you keep these files
* RunSrv.sh (because it contains the changed MatchSettings path to dnscloud.txt)
* TM2/UserData/Config/dedicated_cfg.txt (login credentials, etc)
Because they would get overridden, simply remove them from TM2_new folder (and ofc keep backups from your working server in the first place!)
$ zip -r tm2_server_20110905.zip TM2 $ rm TM2_new/RunSrv.sh $ rm TM2_new/UserData/Config/dedicated_cfg.txt
Run diff again if you not sure about it. Then stop the running server, e.g. like using this small script
$ cd TM2; vim stopall
#!/bin/bash #easy - manialive dies if ManiaPlanetServer dies killall ManiaPlanetServer echo "done."
$ sh stopall ; cd ..
Now it’s time to copy the prepared data from TM2_new/ into TM2/ – because there’s some write protected stuff, we’ll kick the files in the original folders because plain copy could fail.
$ rm -f TM2/ManiaPlanetServer* rm TM2/List* TM2/RunSrv.bat $ cp -r TM2_new/* TM2/
Now start again, e.g. with this small start script including manialive.
$ vim runall
#!/bin/bash # first start tm2 dedicated, then manialive cd ~/TM2/ sh RunSrv.sh echo "now starting manialive..." sleep 5 cd ~/manialive/ManiaLive2_r251 ./run --start echo "done."
Check your map settings and order, if you wanna update those too, and in case everything is ok, start the server.
$ sh runall