blob: f43ec6a92f7d5dddfa52b430a7e75eafbbfbf3d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
[Unit]
Description=Factorio game headless server
Documentation=http://www.factorio.com/
After=network.target
[Service]
User=factorio
EnvironmentFile=/etc/conf.d/factorio
WorkingDirectory=/var/lib/factorio
ExecStartPre=/bin/bash -c "[[ -f '${SAVE_NAME}.zip' ]] || /usr/bin/factorio --create '${SAVE_NAME}.zip' $FACTORIO_CREATE_ARGS"
ExecStart=/usr/bin/factorio --server-settings /etc/factorio/server-settings.json --start-server '${SAVE_NAME}.zip' $FACTORIO_EXTRA_ARGS
TimeoutStopSec=30
KillSignal=SIGINT
RestartSec=10
Restart=on-failure
[Install]
WantedBy=multi-user.target
|