Instantly share code, notes, and snippets.

Embed
What would you like to do?
dinaip service systemd
[Unit]
Description=dinaip - DDNS service by Dinahosting
[Service]
Type=forking
ExecStart=/usr/sbin/dinaip -u USER -p PASSWD
ExecStop=/usr/sbin/dinaip -d
PIDFile=/var/run/dinaip.pid
Restart=on-failure
[Install]
WantedBy=multi-user.target
@mcanes

This comment has been minimized.

mcanes commented Jun 8, 2017

Hi,
Since dinaip it's a daemon it's better launch it with the forking type and allow systemd track the PID to restart the service if it fails.

[Service]
Type=forking
ExecStart=/usr/sbin/dinaip -u USER -p PASSWD
ExecStop=/usr/sbin/dinaip -d
PIDFile=/var/run/dinaip.pid
Restart=on-failure
@vrdominguez

This comment has been minimized.

Owner

vrdominguez commented Apr 1, 2018

Thanks for the advice, tested and updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment