Hi!
I'm already running one OTTD server in dedicated mode on my FreeBSD machine. What I now trying to do, is to have multiple servers on the same machine, serving different maps - scenarios, games starting in different dates, etc. I understand that I can pass the -c command line option to specify a different configuration file. What happens with .openttd directory? The OTTD server will be running under the same user for ease of administration, so the directory will be shared among the OTTD instances. So, I presume that the savefiles will be trushed.
A workaround would be to use FreeBSD Jails to start different instances of the OS and 'jail' OTTD in there, but I was hopping to avoid that, since the Jail comes with extra ~100MBytes of installation!
Anyone else has an idea?
Multiple dedicated servers on the same machine...?
Moderator: OpenTTD Developers
-
- Route Supervisor
- Posts: 389
- Joined: 04 Feb 2004 23:24
- Contact:
Mulitiple servers.
Why not just put the servers in different directories on the machine ? they will load with separate pids. I run a production and test versions that way and they work fine. I just have separate ports for the two servers.
Greg
Greg
Why not just copy the entire OpenTTD directory to something new?
Or alternatively do something like what I've done at times:
lrwxrwxrwx 1 root root 25 Aug 8 00:16 data -> ../../dists/openttd/data/
-rw-r--r-- 1 games users 100 Aug 13 14:11 hs.dat
lrwxrwxrwx 1 root root 25 Aug 8 00:16 lang -> ../../dists/openttd/lang/
-rw-r--r-- 1 games users 3478 Aug 13 14:11 openttd.cfg
drwxr-xr-x 3 games users 4096 Aug 8 00:20 save
drwxr-xr-x 2 games users 4096 Aug 8 00:20 scenario
(basically you set up a fake directory which has symlinks to data and lang, then call openttd from wherever it actually is)
Or alternatively do something like what I've done at times:
lrwxrwxrwx 1 root root 25 Aug 8 00:16 data -> ../../dists/openttd/data/
-rw-r--r-- 1 games users 100 Aug 13 14:11 hs.dat
lrwxrwxrwx 1 root root 25 Aug 8 00:16 lang -> ../../dists/openttd/lang/
-rw-r--r-- 1 games users 3478 Aug 13 14:11 openttd.cfg
drwxr-xr-x 3 games users 4096 Aug 8 00:20 save
drwxr-xr-x 2 games users 4096 Aug 8 00:20 scenario
(basically you set up a fake directory which has symlinks to data and lang, then call openttd from wherever it actually is)
Cura Internet OpenTTD
-
- Engineer
- Posts: 22
- Joined: 11 May 2005 09:10
- Location: Rueil-Malmaison (IdF, France)
Autosave on the dedicated server - it doesn't create and new directory, it just makes 2 new files - server_tmp and client_tmp - either in /ottd or in /ottd/data directory (I haven't run server for a while).
If the server crashes, just copy the server_tmp under /save directory and rename it to server.sav, then load the dedicated server and write in the console "load 2" (without quotes). 2 being the newest save-file. You can see all the saves by typing "list_files" (without the quotes).
If the server crashes, just copy the server_tmp under /save directory and rename it to server.sav, then load the dedicated server and write in the console "load 2" (without quotes). 2 being the newest save-file. You can see all the saves by typing "list_files" (without the quotes).

NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Who is online
Users browsing this forum: Amazon [Bot] and 19 guests