Bisa / factorio-init

Factorio init script
MIT License
415 stars 82 forks source link

[Important] Screen Support and config option for PID file #137

Closed chaos234 closed 5 years ago

chaos234 commented 6 years ago

I looked through the script and where shocked that it isn't using the important screen cmd to give full support for multiple factorio instances.

Also there is no config option to tell where to place the PID file which is also horrible!

I use the following structur:

--|userdir/ ----|init/ ------|fN/ (PID folder per instance) ------|configN (config per instance) ------|factorioN (startscript per instance) ----|factorioN/ (game instance folder)

This keeps things very clean and N can be any number as long as the char limit isn't exeeded. But this requires screen to monitor all instances, which I couldn't find in the start script and it requires an option where to place the PID file, which isn't possible too.

Also never, never ever kill a process with the kill cmd as long as you don't want to lose data. Please use a possible --stop option and if such an option does not exists, blame factorio devs for it and request such an option for clean shutdown.

tmzasz commented 6 years ago

Dont really see this as an issue this script isint meant for multiple servers its meant to run a factorio server as a service ( which also explains the reason screen is not included ) not be a multi server control script. Also the kill cmd works fine this is linux after all not windows the server is designed to take ctrl^C or kill for shutdown as is MOST linux/unix software, some research on this would show you that.

Bisa commented 5 years ago

@tmzasz alreayd gave ample explanations ;)

That said, @chaos234 if you want to contribute changes to the project in order to make this script easily run N instances, please feel free to do so - I've had it in mind some time now but never got around to actually fix it since I mostly just ran one instance at a time.