On Fri, 12 Dec 2014 10:51:04 +0100 Markus Koschany <a...@gambaru.de> wrote:
[...]
> It would be nice if pokerth-server provided a systemd service file and
> a System V init script, so that the server could be conveniently
> monitored and started as a daemon.

The following systemd service file works for me. It is important to set
Type=forking and to specify the PIDFile location. Due to bug

https://bugs.debian.org/772929

you have to symlink the executable and the data directory into the same
working directory. Now only a system-wide pokerth user is missing which
could be created in postinst.

[Unit]
Description=PokerTH multiplayer server
Documentation=man:pokerth_server(6)
After=network.target

[Service]
Type=forking
Restart=on-failure
User=pokerth
ExecStart=/var/games/pokerth/pokerth_server -p /run/pokerth.pid
PIDFile=/run/pokerth.pid

[Install]
WantedBy=multi-user.target

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to