Native Linux server (with management scripts)

You won't find any information on restoring, after all that's just plain file handling ;)

What I meant with proper way is making sure file permissions are correct after restoring stuff and making sure to grab the correct files in the first place (and put them in the correct place of the save of course).

 
Hi Alloc, thanks for your great work on this.

I have a couple questions.

I have mods to put in, they go into sdtd/engine/mods or do they go somewhere else?

Does the serverconfig.xml get used in sdtd/engine? Does the info just get pulled from /sdtd/instances/name/ config.xml?

How do I add files from a windows machine to the server?

Thanks for your help.

 
I can answer these.

I have mods to put in, they go into sdtd/engine/mods or do they go somewhere else?
They go under /home/sdtd/engine/Mods

Does the serverconfig.xml get used in sdtd/engine? Does the info just get pulled from /sdtd/instances/name/ config.xml?
Each instance has a config.xml you configure the server settings in.

How do I add files from a windows machine to the server?
There may be a few ways to do this, but my personal preferred method is to use WinSCP to establish an SCP session to the Linux server and dump the files into your SSH user home folder, then SSH in as your user and copy them to the appropriate sdtd folders. Once the files are in place make sure to chown (change owner) the files.

For example if you use the Nitrogen tool by Damocles to generate your own maps you can upload it to /home/sdtd/engine/Data/Worlds. (also try to keep your world names short or use _ between multiple words in the name as linux just likes that better and it's less confusing than having to use \ for proper formatting of hard spaces in the name.)

Code:
chown -r sdtd:sdtd /home/sdtd/engine/Data/Worlds/<World name>
Or if you copied files into /home/sdtd/engine/Mods

Code:
chown -r sdtd:sdtd /home/sdtd/engine/Mods
As stated above, chown stands for change owner. sdtd has to own all the files under the folder for things to function properly. This is especially important if your restoring files from the backup.

NOTE: I personally have a symbolic link to a separate hard drive that I have mounted as /archive. I have symbolically linked /home/sdtd/backup --> /archive/backup/sdtd.

 
Last edited by a moderator:
Do you guys have a recommended restart interval? Right now i am restarting every 8 hours with a cronjob.

Code:
20 6,14,22 * * * /usr/local/bin/7dtd.sh kill naboo && sleep 300 && /usr/local/bin/7dtd.sh start naboo
Could i get away with just restarting once every 24 hours or dose the server get wonky if it runs that long?

 
Do you guys have a recommended restart interval? Right now i am restarting every 8 hours with a cronjob.
Code:
20 6,14,22 * * * /usr/local/bin/7dtd.sh kill naboo && sleep 300 && /usr/local/bin/7dtd.sh start naboo
Could i get away with just restarting once every 24 hours or dose the server get wonky if it runs that long?
I used to do 24 hours, I'm doing 12 now.

 
I can answer these.

They go under /home/sdtd/engine/Mods

Each instance has a config.xml you configure the server settings in.

There may be a few ways to do this, but my personal preferred method is to use WinSCP to establish an SCP session to the Linux server and dump the files into your SSH user home folder, then SSH in as your user and copy them to the appropriate sdtd folders. Once the files are in place make sure to chown (change owner) the files.

For example if you use the Nitrogen tool by Damocles to generate your own maps you can upload it to /home/sdtd/engine/Data/Worlds. (also try to keep your world names short or use _ between multiple words in the name as linux just likes that better and it's less confusing than having to use \ for proper formatting of hard spaces in the name.)

Code:
chown -r sdtd:sdtd /home/sdtd/engine/Data/Worlds/<World name>
Or if you copied files into /home/sdtd/engine/Mods

Code:
chown -r sdtd:sdtd /home/sdtd/engine/Mods
As stated above, chown stands for change owner. sdtd has to own all the files under the folder for things to function properly. This is especially important if your restoring files from the backup.

NOTE: I personally have a symbolic link to a separate hard drive that I have mounted as /archive. I have symbolically linked /home/sdtd/backup --> /archive/backup/sdtd.
Thanks, that helped immensely.

 
I used to do 24 hours, I'm doing 12 now.
Huh? Is this server under heavy load? We ran on a linux server now up to day 90 with 3-4 players, and the server was only restarted when we added mods or changed the config. Last interval it was running for several weeks 24/7 without any restart. We haven't had any problems yet.

 
Huh? Is this server under heavy load? We ran on a linux server now up to day 90 with 3-4 players, and the server was only restarted when we added mods or changed the config. Last interval it was running for several weeks 24/7 without any restart. We haven't had any problems yet.
Yeah, I have two popular servers under good load and run three testing instances. If I let it go 24 hours, things start getting wonky. I am exceeding the supported player count.

 
Is this a change from A17?
Seems like A18 brought some good improvements.
Yes, with a17, I was running 24 hours between restarts. In a16 I could go a week. In a18 we were seeing issues caused by memory leaks if we left it up longer than 12. It still sometimes crashes after about 8 hours of running anyway.

 
Thanks SylenThunder,

I think I'll keep rolling with the restart every 8 hours myself as I am seeing the server abend (abnormally end coined during the old days of Novell server administration) a few times a week between 5 to 8 hours as well. On a side note, I was running my restarts with a restart.exp (restart notifications through telnet) beforehand and ended up having to break out the actual restart from the restart.exp cron job. The reason I did this is that if the server abended the restart.exp cron job would fail due to no telnet session being available, then the entire cronjob would stop. Now if the server experienced an abend it will shut down no matter if the telnet session is available to warn people or not. And for good measure (though it may be overkill), I have also added in an hourly start in case the server has abended.

Code:
20 6,14,22 * * * su sdtd -c "/home/sdtd/instances/naboo/restart.exp" >/dev/null
30 6,14,22 * * * /usr/local/bin/7dtd.sh kill naboo && sleep 60 && /usr/local/bin/7dtd.sh start naboo >/dev/null
40 * * * * /usr/local/bin/7dtd.sh start naboo >/dev/null
 
Last edited by a moderator:
Hi!

Any idea about what I'm doing wrong? Mint Linux, all requirements should be met (I've double checked today)

Code:
Downloading and installing management scripts

2020-01-04 16:36:50 URL:http://illy.bz/fi/7dtd/management_scripts.tar.gz [35755/35755] -> "/tmp/management_scripts.tar.gz" [1]

Compiling start-stop-daemon
start-stop-daemon.c:59:10: fatal error: sys/syscall.h: No such file or directory
#include <sys/syscall.h>
         ^~~~~~~~~~~~~~~
compilation terminated.
chown: cannot access 'start-stop-daemon': No such file or directory
chmod: cannot access 'start-stop-daemon': No such file or directory
I've tried to see if I could start it anyway but I get this:

Code:
sdtd@gameserver001:/etc/init.d$ sudo 7dtd.sh start Test_001
/usr/local/lib/7dtd/common.sh: line 78: /usr/local/lib/7dtd/start-stop-daemon/start-stop-daemon: No such file or directory
/usr/local/lib/7dtd/common.sh: line 78: /usr/local/lib/7dtd/start-stop-daemon/start-stop-daemon: No such file or directory
Failed!
An these are the contents of the directory:

Code:
sdtd@gameserver001:/usr/local/lib/7dtd/start-stop-daemon$ ls
makefile  start-stop-daemon.c
Thanks! :smile-new:

 
Should automatically be found in the default installation directory. If not it's most likely just not installed ;)

 
My brain switched lib32gcc1 and libc6-dev, for whatever reason... thanks a lot for taking the time to answer, it all works as intended!

 
Using the method post by Zigstrum here I was able to create a script to turn off rain using the weather command if anyone else is intrested.

I called it rain.exp

Code:
#!/usr/bin/expect -f
set force_conservative 0  ;# set to 1 to force conservative mode even if
                         ;# script wasn't run conservatively originally
if {$force_conservative} {
   set send_slow {1 .1}
   proc send {ignore arg} {
       sleep .1
       exp_send -s -- $arg
   }
}

set timeout 10
spawn telnet localhost 8061
match_max 100000
expect "Please enter password:\r"
send "<password here>\r"
send "say \"Turning off rain\"\r"
sleep 1
send "weather rain 0\r"
send "exit\r"
expect eof
 
Ran into an issue trying to update from 18.2 to 18.3.

Environment: Ubuntu Linux 18.04 LXC (containerized)

Using the script configured steamcmd.sh produced the following:

Code:
root@7dtd:/home/sdtd/steamcmd# ./steamcmd.sh 
Redirecting stderr to '/root/Steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...applicationmanager.cpp (3911) : Assertion Failed: CApplicationManager::GetMountVolume: invalid index
applicationmanager.cpp (3911) : Assertion Failed: CApplicationManager::GetMountVolume: invalid index
applicationmanager.cpp (4074) : Assertion Failed: m_vecInstallBaseFolders.Count() > 0
OK.
I wasn't able to find very much information about this online... like... at all. I'm posting this for information purposes.

Eventually, I installed steamcmd from the Ubuntu repos. Using the system steamcmd.sh thereafter, the system version didn't produce the GetMountVolume errors. 7dtd.sh script still didn't work, since it wasn't using the system steamcmd. But, I confirmed I was able to manually upgrade the engine using the steamcmd from the repos.

In the end, I ended up deleting the /home/sdtd/{Steam|engine|steamcmd} directories and then reattempted 7dtd.sh updateengine, which downloaded a fresh copy of steamcmd and proceeded to upgrade the engine successfully.

Hope this helps someone.

 
Using the script configured steamcmd.sh produced the following: ...
First of all you should not run SteamCMD yourself if using my scripts, that is bound to cause ♥♥♥♥ups in the end ;)

Anyway, SteamCMD throwing weird assertions isn't *that* uncommon, most of them can be ignored. The only thing that really matters if it updates properly in the end.

7dtd.sh script still didn't work, ...
Would need more output from when it runs, not just the above snippet as it's not directly related to the actual update process.

Sounds like you found a workaround for yourself though, so glad it works :)

 
Hey there,

At first i must thank Alloc for his awesome on the fixes and scripts. It's so easy to manage a dedi server with your scripts/tools.

I love the map rendering thing and have a question regarding that.

I've setup a new dedicated instance from an existing save game. I created the instance and copied the world as well as the player data into the appropriate instance folders. All is working fine so far but only parts of the map discovered on the new server is visible.

Is there a way to render the missing image files from the players .map files?

I found this thread in the forum https://7daystodie.com/forums/showthread.php?14947-Export-discovered-map-to-png but the tool does not produce the correct images. The image size on the lowest zoom level is 256x256 for example.

Could anyone give me some hints or so how to do this?

Thanks in advance!

 
Back
Top