dwarfmaster1974 Posted October 24, 2020 Share Posted October 24, 2020 Howdy folks, me and my girlfriend ran a small dedicated server at home with 7 day to die, so we could build and tinker undisturbed. The installation of the server was quite easy and worked out quite well. The whole thing runs on Ubuntu and I set up a systemd service for it. This works also quite well, if there weren't the updates. So I thought it would be smart to tell the service to do the updates for the server as well. But I can't get it to run. Here is my systemd-file: https://pastebin.com/EQG5K5mh here the update7dtd.sh: https://pastebin.com/K0DJsmJ5 here the update7dtd.steam: https://pastebin.com/bJVbM0j0 Every time I call systemctl start 7dtd I get an error message: https://pastebin.com/07As7h1H This is what the systemctl status 7dtd looks like: https://pastebin.com/5Lny7F0A and so the journalctl -xe shows up like this: https://pastebin.com/FnZkwj8d What am I doing wrong? Someone out there who can help me? Greeting from Navezgane Germany Division Outpost Kiel Link to comment Share on other sites More sharing options...
meganoth Posted October 24, 2020 Share Posted October 24, 2020 What does /root/Steam/logs/stderr.txt say? Did you try out if steam works if started from root? Maybe there is some safety-code in steamcmd to not allow running as root Link to comment Share on other sites More sharing options...
dwarfmaster1974 Posted October 24, 2020 Author Share Posted October 24, 2020 /root/Steam/logs/stderr.txt is empty. So nothing to show after entering this command: root@deskserver:~/Steam/logs# steamcmd This output shows up: https://pastebin.com/m31PKdhE Looks fine for me ... or not? Link to comment Share on other sites More sharing options...
meganoth Posted October 24, 2020 Share Posted October 24, 2020 23 minutes ago, dwarfmaster1974 said: /root/Steam/logs/stderr.txt is empty. So nothing to show after entering this command: root@deskserver:~/Steam/logs# steamcmd This output shows up: https://pastebin.com/m31PKdhE Looks fine for me ... or not? Steamcmd was updated twice? That sounds unusual. I just started steamcmd as well and it did update, but only once. Any<way, the systemd output shows he tries to do the update which seems to be followed by steamcmd restarting, which fails. My guess is that the update failed as well since you had to update by calling it manually. It might be because of the shutdownonfailed command and some routine mistaking this for an error (timeouts, return value different, who knows) it never gets past the update. You should do another reboot to see if it upgrades now. If I'm right it will work now because the steamcmd update has been done and won't interfere anymore. My stderr.txt after doing the upgrade was not empty by the way: CApplicationManagerPopulateThread took 0 milliseconds to initialize (will have waited on CAppInfoCacheReadFromDiskThread) CAppInfoCacheReadFromDiskThread took 139 milliseconds to initialize Now, running a script you have in your users home dir as root is practically giving everyone who might hack into your user account a direct way to get root privileges, you might as well just run everything as root. And maybe there are even safety checks somewhere to prevent steamcmd running as root. So, independant of your problem, I would advise to redesign the service to run the script as the user. Just google for "systemd run service as user" and you will find lots of info on how to do that . It basically is two lines in the service file giving userid and groupid of the user. Also make sure that no files in your home dir have owner root after you make this change, i.e. do "chown -R tatilumini /home/tatilumini". Especially if the update worked with the root script there might be lots of files owned by root now in there. Link to comment Share on other sites More sharing options...
SylenThunder Posted October 24, 2020 Share Posted October 24, 2020 You cannot run the dedi client as root. It must be run as a user account. I personally highly recommend LGSM as it is relatively easy to set up and configure. I even wrote a guide for it. https://7dac.net/linux-server-setup-guide/ Link to comment Share on other sites More sharing options...
dwarfmaster1974 Posted October 27, 2020 Author Share Posted October 27, 2020 Sorry for the late feedback. I have decided to do something completely different, namely docker with this: https://hub.docker.com/r/didstopia/7dtd-server Pretty cool the whole thing. With a little bit of research I was able to set it up quickly and, most importantly, it was update proof. If you need a manual for this I can deliver it. Unfortunately the readme there is not the whole truth and some things I had to do myself. But I for my part am very enthusiastic. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.