jmaster Posted September 28, 2016 Share Posted September 28, 2016 Hello. I have dedicated server on debian. Is anybody know how to automate update process, when Klei do update of DST? As for me, i did script with stop servers, then +app_update and start servers.... And put it on schedule. But it is really uncomfortably. Because of server restarts even with really updates and without them. Is there any way to minimize of server restarts, and to use auto scripts when updates really exists? Link to comment Share on other sites More sharing options...
cezarica Posted September 28, 2016 Share Posted September 28, 2016 It happens I was thinking about doing the same thing and since I like to learn new stuff I got a nice perl script to do the job: #!/usr/bin/perl use warnings; use strict; use HTML::TagParser; my $file = 'release.txt'; my $url = "http://forums.kleientertainment.com/game-updates/dst/"; my $html = HTML::TagParser->new($url); my @list = $html->getElementsByClassName("cRelease"); my ($release) = $list[0]->innerText =~ /(\d+)/; my $rel = 0; if (-f $file) { open(my $fh, '<', $file); $rel = <$fh>; close $fh; } if ($release > $rel) { open(my $fh, '>', $file); print $fh $release; close $fh; print "update! \n"; } else { print "no update required!\n"; } It may not be great looking but what is important is that works It only needs the part where you shutdown your servers and start them over again to update. This part I haven't figured out yet cos I used guide and when running screen ~/run_dedicated_servers.sh so I can detach from the server I see the Master and Caves in the same console (screen) and if I do the c_shutdown() on master then the Master goes down but the Caves doesn't and it keeps trying to reconnect to it and I have to c_shutdown() again to close the Caves as well. I guess cos I took out -monitor_parent_process but added it back and will see what happens at first shutdown. How do you start yours in screen or you are using something else? Link to comment Share on other sites More sharing options...
jmaster Posted September 29, 2016 Author Share Posted September 29, 2016 Now I use four servers for one game and I start them us on server startup via rc.local usual by (on BIN directory of dst server): with little start_dst.run screen -d -m -S "dst_master" ./dontstarve_dedicated_server_nullrenderer -cluster Cluster_1 -shard Master screen -d -m -S "dst_slave1" ./dontstarve_dedicated_server_nullrenderer -cluster Cluster_1 -shard Slave1 screen -d -m -S "dst_slave2" ./dontstarve_dedicated_server_nullrenderer -cluster Cluster_1 -shard Slave2 screen -d -m -S "dst_slave3" ./dontstarve_dedicated_server_nullrenderer -cluster Cluster_1 -shard Slave3 I stop them with other easy commands in run script (it close servers correctly as Ctrl+c - it's analog of c_shutdown() ): screen -S dst_master -X at "#" stuff $'\003' screen -S dst_slave1 -X at "#" stuff $'\003' screen -S dst_slave2 -X at "#" stuff $'\003' screen -S dst_slave3 -X at "#" stuff $'\003' May be now you will upgrade your script Wait for your example Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.