Jump to content

Fix dedicated_server_mods_setup.lua overwrite Linux


Recommended Posts

If you run into the problem that dedicated_server_mods_setup.lua gets overwritten at server start (on Linux):

 

Edit run_dedicated_servers.sh on line 29

from

./steamcmd.sh +force_install_dir "$install_dir" +login anonymous +app_update 343050 validate +quit

to

./steamcmd.sh +force_install_dir "$install_dir" +login anonymous +quit

 

Windows user should have a very similar line of code on line 1 of there .bat file (still don't understand why people host servers on windows...)

Link to comment
Share on other sites

You can just delete the line just like described in my guide

On 13.10.2018 at 7:59 PM, Daniel86268 said:

Addition:
On some occasions the dedicated_server_mods_setup.lua file get's overwritten by the launch script with the empty original script, if it's configured to first check if there are any server updates.
If that's happening for you as well, you have to check your startup script for a line like this:


./steamcmd.sh +force_install_dir "$install_dir" +login anonymous +app_update 343050 validate +quit

Just delete or uncomment it for the time being, but keep in mind that you need to either manually enter it every time the server updates, or readd it once after each update.

(There's no reason why your server should log into steamcmd just to quit straight away again without achieveing anything. Just leave it out.)

Link to comment
Share on other sites

I solved this by creating a script for updating the app that includes something like this:

#!/bin/bash

# Stop DST servers
/bin/systemctl stop dontstarve.service;

# Copy current dedicated_server_mods_setup.lua to backup
/bin/cat /home/steam/dontstarve/mods/dedicated_server_mods_setup.lua > /home/steam/backup_dedicated_server_mods_setup.lua;

# Update DST
/home/steam/steamcmd +force_install_dir "$install_dir" +login anonymous +app_update 343050 validate +quit;

# Restore dedicated_server_mods_setup.lua from backup
/bin/cat /home/steam/backup_dedicated_server_mods_setup.lua > /home/steam/dontstarve/mods/dedicated_server_mods_setup.lua;

# Start DST servers
/bin/systemctl start dontstarve.service;

# Leave happy
exit 0;

You can then run it in a chron job

You can find the systemd and start scripts here:

 

Here is the crontab entry to run updates at 3 am every Monday

0 3 * * 1 /usr/local/bin/dontstarve_update > /dev/null 2>&1 –

make sure to chmod +x the script to allow execution

chmod +x /usr/local/bin/dontstarve_update

 

Link to comment
Share on other sites

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.

×
  • Create New...