service_files/systemd/openttd.service

18 lines
507 B
Desktop File

[Unit]
Description=openttd game server
Wants=network.target
PartOf=steam-tmux-master.service
After=steam-tmux-master.service
[Service]
Type=oneshot
WorkingDirectory=/home/steam
User=steam
Group=steam
RemainAfterExit=yes
ExecStart=/usr/bin/tmux new-session -s openttd -d "/usr/local/games/openttd -D 192.168.1.11:3979 -c /home/steam/.config/openttd/openttd.cfg -g /home/steam/.local/share/openttd/save/save.sav"
ExecStop=/usr/bin/tmux send-keys -t openttd "quit" Enter
[Install]
WantedBy=multi-user.target