OpenFactorioServerManager / factorio-server-manager

A tool to help manage Factorio multiplayer servers including mods and save games.
MIT License
541 stars 129 forks source link

Daemonize the executable #360

Open cyanide-aoe2 opened 10 months ago

cyanide-aoe2 commented 10 months ago

Currently using screen. However, it would be nice to have a --daemon flag that daemonizes the server-manager binary.

Mattie112 commented 10 months ago

I would suggest to use something like:

http://supervisord.org/

(or docker)

knoxfighter commented 10 months ago

No need for a daemon, just use docker or create a systemd (depending on the distro) service.

We provide a docker image. for simple setup use the example compose file: docker-compose.simple.yaml

Zorbatron commented 7 months ago

You could use a Systemd service if you're avoiding Docker. Assuming that your ofsm location is in /opt, it could look like this:

[Unit]
Description=Open Factorio Server Manager

[Service]
WorkingDirectory=/opt/ofsm
ExecStart=/opt/ofsm/factorio-server-manager

[Install]
WantedBy=multi-user.target

If you're using something like OpenRC because you're also avoiding Systemd then you can make services for that too.

But the easiest way is to use Docker as Mattie112 and knoxfighter have said.