factorio-server-manager icon indicating copy to clipboard operation
factorio-server-manager copied to clipboard

Daemonize the executable

Open cyanide-aoe2 opened this issue 2 years ago • 4 comments

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

cyanide-aoe2 avatar Sep 04 '23 06:09 cyanide-aoe2

I would suggest to use something like:

http://supervisord.org/

(or docker)

Mattie112 avatar Sep 04 '23 07:09 Mattie112

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

knoxfighter avatar Sep 04 '23 13:09 knoxfighter

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.

Zorbatron avatar Nov 10 '23 09:11 Zorbatron