Steps to reproduce the behaviour:
See a new config for an instance is created. Even when you create one yourself it won't work the all instances will instead use the 'dst-server-Master.cfg'
So this might be a bit long winded but I was able to get this working, perhaps someone could take this idea and run with it...
after looking around a bit I see where there is some recursive logic with the install function that overwrites config with _default.cfg and because the filename is using $[Shard] everytime it installs it rewrites and the default instance config becomes dst-server-Master.cfg. after playing around with this for awhile, i decided i couldnt fix the recursive logic without breaking a lot of other stuff... so what i decided to do was edit line 39 on the dstserver script that points to the config directory and change gameservername to servicename:
configdirserver="${configdir}/${servicename}"

I then renamed the dstserver script dstserver-master
ran linuxgsm.sh dstserver to install another instance of the dstserver script edited line 39 again
and renamed this one dstserver-caves

now once you install both of these if you look in /home/dstserver/lgsm/lgsm-config you will have two directory's

each directory will still have the recursive instance dst-server-Master.cfg but you can now modify this file in either directory without worry about it getting overwritten. for example here is what my
/home/dstserver/lgsm/lgsm-config/dstserver-master/dst-server-Master.cfg looks like:

And
/home/dstserver/lgsm/lgsm-config/dstserver-caves/dst-server-Master.cfg looks like:

Now that you have two lgsm configs setup correctly if you run ./dstserver-caves details you should get some errors about the config missing, but it will tell you the correct directory in .klei to create
a side note, i don't know if i just missed it inside the install but it appears the lua file needed for caves to work doesnt get created, so be sure to create it inside the .klei Caves directory:
worldgenoverride.lua
return {
override_enabled = true,
preset = "DST_CAVE",
}
I used the workaround provided by @Ugoff85
Installing dstserver, modifying the script, creating a -master and a -cave script
Editing the config files,
and finally running dstserver-master install and dstserver-caves install
On my machine it created only the .klei Master directory, and overwrote the master server settings with the Caves server settings, including worldgenoverride.
I can't figure out how to make the script using the .klei Caves directory.
I don't post the instance config files because they look exactly like in the previous post.
vim ./lgsm/config-default/config-lgsm/dstserver/_default.cfg
change
servicename="dst-server-${shard}"
to
#servicename="dst-server-${shard}"
Dont starve has turned out to be one of the more confusing server for me to develop. To develop this further I will need someone who is a server admin to improve the features of this server.
I can help and can provide all the necessary information
@hrtrd What I really need is a very simple rundown of the issues and how it should work. As I don't run DST myself its very hard to understand it. Basically I need to be told what I need to do.
First step need fix install. At the stage of creating directories and copying configs into them, the installation script tries to create the root directory / Master / and copy server.ini there.
default configs from https://github.com/GameServerManagers/Game-Server-Configs
fetching cluster.ini...OK
fetching server.ini...OK
copying cluster.ini config file.
copying server.ini config file.
'/home/dstbel/lgsm/config-default/config-game/server.ini' -> '/Master/server.ini'
cp: cannot create regular file '/Master/server.ini': Permission denied
cluster.ini is already configured.
sed: can't read /Master/server.ini: No such file or directory
sed: can't read /Master/server.ini: No such file or directory
changing shard name.
sed: can't read /Master/server.ini: No such file or directory
changing master setting.
sed: can't read /Master/server.ini: No such file or directory
GitHub
A repo of game server configuration files used by LinuxGSM - GameServerManagers/Game-Server-Configs
But this file need put to ~/.klei/DoNotStarveTogether/Cluster_1/Master/server.ini
In meantime I switched to manage DST on my server with puppet.
I just released my puppet module for automating DST deployment and configuration.
Maybe it helps implementing DST in GSM.
https://github.com/qroac/puppet-dstserver
GitHub
Manage Dont Starve Together dedicated server instances with puppet - qroac/puppet-dstserver
The first issues @hrtrd will be fixed in the next release
@qroac thanks that might be useful for me to take a look at :)
I can run through my process again and see if I can better step by step explain the problem, it has a lot to do with the way configs are shared in the ~/.klei folder, we also need to figure out a way to create the lua file. I'll see if I can wrap my head around it again.