[Unit] Description=syncplay server Wants=network.target [Service] Type=forking WorkingDirectory=/srv/syncplay User=syncplay Group=syncplay RemainAfterExit=yes ExecStart=/usr/bin/tmux new-session -s syncplay -d /srv/syncplay/autorun.sh ExecStop=/usr/bin/tmux kill-server KillMode=none [Install] WantedBy=multi-user.target