Bisa / factorio-init

Factorio init script
MIT License
415 stars 82 forks source link

running multiple Maps on Centos 7 with alternative glibc 2.18 #141

Closed futureweb closed 4 years ago

futureweb commented 5 years ago

Hey there, I would like to host several Maps on my Factorio Server (running Centos 7 with alternative gllibc 2.18). Is this somehow possible with this Init Script? thx, bye from Austria Andreas Schnederle-Wagner

tmzasz commented 5 years ago

this script sadly was not designed to run multiple maps its intended to be a single server automation script. That being said its not "impossible" just some extra work would be involved. You would have to have multiple copies of the script in different folders and then modify the service files to target the different scripts

PIDFile=/opt/factorio/server.pid

Type=forking TimeoutStartSec=20 ExecStart=/opt/factorio-init/factorio start TimeoutStopSec=20 ExecStop=/opt/factorio-init/factorio stop

those would be what you would need to change in the service file as well as the name I do believe ( so factorio1.service, factorio2.service etc, etc)

now you can use the same factorio install just make sure you tell it the different paths for the different server configs ( otherwise it will use the same config for all and im confident that's not what you want it to do ) SERVER_SETTINGS=${FACTORIO_PATH}/data/server-settings.json have that point to say ${FACTORIO_PATH}/configs/server-settings1.json for the first server and ${FACTORIO_PATH}/configs/server-settings2.json for the second server and so forth