service_files/systemd/openttd.service

18 lines
507 B
SYSTEMD
Raw Permalink Normal View History

2024-12-18 10:51:48 -03:00
[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