Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@vrdominguez
Last active April 1, 2018 17:42
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrdominguez/bc13a3859dfd2243f9ce to your computer and use it in GitHub Desktop.
Save vrdominguez/bc13a3859dfd2243f9ce to your computer and use it in GitHub Desktop.
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
Copy link

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
Copy link
Author

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