I unpacked the generic binaries on my Debian Etch vRoot server in /etc/openttd
/etc/openttd is the home directory of user openttd
I run a dedicated server by cd-ing to /etc/openttd as root and sudo -u openttd nohup ./openttd -D > ded.log &
Runs fine - I could join the server and play. But unconfigged default server is not what I need. The doc states the server config would be found in ~/.openttd/openttd.cfg. As I put the config file into /etc/openttd/.openttd nothing happened as expected. Still default server after restarting.
I tried using root home as home directory (because I sudo as root - who knows...), putting openttd.cfg into /root/.openttd. No success. Later I more or less accidentally put the config into the base directory containing the openttd executable. Wow. That worked for some reason. Now I could finally configure the server.
Great. But what happens if my server crashes, reboots or whatever? The dedicated ottd server will be started again but it will be a completely new game. Solution: loading the last autosave automatically. I read around the manual and stepped over startup scripts. They are documented to be automatically executed in given circumstances. So I cd-ed into /etc/openttd/scripts and copied on_dedicated.scr.example to on_dedicated.scr and changed it's contents to:
Code: Select all
echo "Setting dedicated network server settings..."
server_name = "TESTING 2"
cd autosave
load 1
Thank you very much in advance for any help!
Regards
annih