summarylogtreecommitdiffstats
path: root/factorio-init.service
diff options
context:
space:
mode:
authorxiretza2017-04-14 00:26:58 +0200
committerxiretza2017-04-14 00:26:58 +0200
commitd3d4ac1a37bf02c496988426ca85ebcdbc45d412 (patch)
tree682df5d9af488cc55e1a63a1288ea9cf2ae126d8 /factorio-init.service
downloadaur-d3d4ac1a37bf02c496988426ca85ebcdbc45d412.tar.gz
initial commit
Diffstat (limited to 'factorio-init.service')
-rw-r--r--factorio-init.service22
1 files changed, 22 insertions, 0 deletions
diff --git a/factorio-init.service b/factorio-init.service
new file mode 100644
index 00000000000..c270d26664c
--- /dev/null
+++ b/factorio-init.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=Factorio Server Init Script
+After=network.target
+
+[Service]
+User=factorio
+Group=games
+
+# We will store a pid file in your ${WRITE_DIR}/server.pid
+# Adjust if you change the write dir of your server
+PIDFile=/var/lib/factorio/.factorio/server.pid
+
+Type=forking
+TimeoutStartSec=20
+ExecStart=/usr/bin/factorio-init start
+TimeoutStopSec=20
+ExecStop=/usr/bin/factorio-init stop
+RestartSec=20
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target