Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Would require some workarounds to make this possible though.
Structure would be:
Update checks if there is a lockfile
if there is one, stop the update process since one is pending
If an update is available
then create a lockfile
connect to rcon
send timed messages until $timerupdate is 0
apply the update
restart the server
Seems quite logical to me.
The part i can't get around is the core Rcon part that hooks into ShooterGameServer. The Rcon module doesn't need any features pure basic headless client process to simply interface with ShooterGameServer process to deliver basic commands connecting to local host on defined rcon port ***** specified from the arkserver script. Could work quite well with existing scripts and even expand the ./arkserver stop command to use this rcon module to Saveworld & exit gracefully....
Source: http://www.ark-survival.net/en/2015/07/09/rcon-tutorial/
Full script: https://www.ryanschulze.net/archives/1052
Maybe something you can work with or build similar of potentially ?
https://github.com/GameServerManagers/LinuxGSM/issues/299
So what I've done so far and haven't been able to see if it works because I am waiting for an update is I've edited the update_steamcmd.sh script to run a custom script if and when update_steamcmd.sh detects an update. The script runs MCRCON (another script to access rcon via terminal) and only broadcasts the message with timers set. I am assuming (and hoping) what will happen is after the timers finish it will continue with the update.
update_steamcmd.sh
And my broadcast_restart.sh
I have managed to get this rcon sourcecode script compiled and working on Ubuntu 16.04LTS. Source: http://www.ark-survival.net/en/2015/07/09/rcon-tutorial/
I have done very low-level crude testing so far just initiating broadcast messages / saveworld / listplayers etc... From this I hope to implement this into the update.sh if the server is to go down for update just a simple message with pause will do nothing fancy. Like you've done with broadcast_restart.sh I’ll probably compose something similar using pauses until it saves world then initiates ./arkserver stop to put that lockfile in place so the monitor doesn't restart it whilst updating. Simple, crude but effective I guess.
Screenshot: http://imgur.com/l03of93
./rcon -Prconpassword -a192.168.2.7 -p32330 listplayers
./rcon -Prconpassword -a192.168.2.7 -p32330 broadcast "Server shutdown in 15 minutes for update"
./rcon -Prconpassword -a192.168.2.7 -p32330 saveworld
@UltimateByte would perhaps know best how to integrate this into LGSM properly perhaps using ${rconport} & {rconpassword} variables in arkserver main script. To note also it will only work if the user has RCONEnabled=True defined in the settings ini. With this particular script i had to define the machine IP likely due to an incorrect Hostsfile issue but its a test box that’s had a lot of abuse.
About what you said, as far as I can see, LinuxGSM is doing all the lock files and stuff when it runs the update script. Even if monitor runs it knows the update script is running. I saw this in my log files. So if I can assume right, it doesn't matter if the update script is running for 30+ mins (Or whatever time), it'll still be locked and the monitor script will know? Here's the logs I am talking about:
I also *believe* LinuxGSM already saves the world for you, or has an option to enable/disable it. Again, I assume, literally everything is there just not the broadcast, which makes sense because different games have different ways to broadcast.
Edit: I had some errors in my broadcast script and after debugging have successfully run the script stand alone with the timers. So as long as that script runs in the update_steamcmd.sh and exits clean, there's no reason that update shouldn't be successful along with the broadcast. Now I just have to wait until me or one of my buddies is on my server during an update.
Disclaimer: This is totally me guessing based on my background in programming, I don't have much experience in bash. Edit these files at your own risk.
I add