Skip to content

Instantly share code, notes, and snippets.

@vrdominguez
Last active April 1, 2018 17:42
Show Gist options
  • Select an option

  • Save vrdominguez/bc13a3859dfd2243f9ce to your computer and use it in GitHub Desktop.

Select an option

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

mcanes commented Jun 8, 2017

Copy link
Copy Markdown

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
Copy Markdown
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