factorio-ansible/templates/factorio.service.j2
2022-04-08 00:08:34 +02:00

18 lines
No EOL
518 B
Django/Jinja

#place in /etc/systemd/system/factorio.service
# systemctl start factorio.service
# systemctl enable factorio.service #autostarts the server
# systemctl stop factorio.service
[Unit]
Descritpion=Factorio Headless Server
After=network.target
After=systemd-user-sessions.service
After=network-online.target
[Service]
Type=simple
User=root
ExecStart=/opt/factorio/bin/x64/factorio --start-server /opt/factorio/saves/my-save.zip --server-settings /opt/factorio/server-settings.json
[Install]
WantedBy=multi-user.target