<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Daniel,</div><div class=""><br class=""></div><div class="">Yes, thanks and I should have mentioned that I am using pretty much the same thing you suggested on my routers, but for whatever reason couldn’t get that approach working on the linux box in question. </div><div class=""><br class=""></div><div class="">Mark,</div><div class=""><br class=""></div><div class="">Thanks for the upstart script. I had tried to do the same myself but couldn’t get my upstart script to work right. I was missing the ‘-D’ flag in my script. Added that and now it’s working great. </div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 29, 2016, at 8:42 AM, Mark Lopez <<a href="mailto:m@silvenga.com" class="">m@silvenga.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><font face="Calibri" size="2" style="font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-size: 11pt;" class=""><div class="">I’ve been having the same issue with Ubuntu, thankfully we have access to Upstart:</div><div class=""> </div><div class="">```</div><div class="">start on (local-filesystems and net-device-up IFACE!=lo)</div><div class="">stop on stopping network-services</div><div class=""> </div><div class="">author "Mark Lopez"</div><div class="">description "Tinc Upstart Job"</div><div class="">version "0.1"</div><div class=""> </div><div class="">env network=master</div><div class=""> </div><div class="">respawn</div><div class=""> </div><div class="">exec /usr/sbin/tincd -n "$network" -D --debug=3 --logfile</div><div class="">```</div><div class=""><font face="Times New Roman" size="3" class=""><span style="font-size: 12pt;" class=""> </span></font></div><div class="">I removed the default init script and switched over to Upstart. Restarts will occur as soon as the process dies. Save the job as “/etc/init/tinc.conf”.<span class="Apple-converted-space"> </span></div><div class=""><font face="Times New Roman" size="3" color="#1F497D" class=""><span style="font-size: 12pt;" class=""> </span></font></div><div class=""><b class="">From:</b><span class="Apple-converted-space"> </span>tinc [<a href="mailto:tinc-bounces@tinc-vpn.org" class="">mailto:tinc-bounces@tinc-vpn.org</a>]<span class="Apple-converted-space"> </span><b class="">On Behalf Of<span class="Apple-converted-space"> </span></b>Daniel J. Grinkevich<br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Friday, January 29, 2016 8:25 AM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span><a href="mailto:tinc@tinc-vpn.org" class="">tinc@tinc-vpn.org</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: respawning dead tinc process</div><div class=""><font face="Times New Roman" size="3" class=""><span style="font-size: 12pt;" class=""> </span></font></div><div class=""><font face="Times New Roman" size="3" class=""><span style="font-size: 12pt;" class="">This is what we use on our routers, running once a minute via crontab.</span></font></div><div class=""><font face="Times New Roman" size="3" class=""><span style="font-size: 12pt;" class=""> </span></font></div><div class=""><font face="Times New Roman" size="3" class=""><span style="font-size: 12pt;" class="">if pgrep "tincd" >/dev/null; then <br class="">  echo "tincd is running"<br class="">else<br class="">  echo "tincd isn't running, restarting"<br class="">  tincd -n nycmesh<br class="">fi</span></font></div><div class=""><font face="Times New Roman" size="3" class=""><span style="font-size: 12pt;" class=""> </span></font></div><div class=""><font face="Times New Roman" size="3" class=""><span style="font-size: 12pt;" class="">On Fri, Jan 29, 2016 at 9:07 AM, pjv <<a href="mailto:pjv@pjv.me" class=""><font color="blue" class=""><u class="">pjv@pjv.me</u></font></a>> wrote:</span></font></div><div style="margin-bottom: 12pt;" class=""><font face="Times New Roman" size="3" class=""><span style="font-size: 12pt;" class="">I have tinc 1.1pre11 running on various routers and linux cloud servers. On one of the cloud servers, under Ubuntu 12.04, tinc is mysteriously dying once in a while, leaving a dangling PID. I have been unable to track down why it is dying, but it happens infrequently enough that I care less about why it is dying than how to robustly respawn it when it dies.<br class=""><br class="">Before I re-invent the wheel, has anyone come up with a solution for automatically detecting a dead tincd and respawning the process on linux?<br class=""><br class="">_______________________________________________<br class="">tinc mailing list<br class=""><a href="mailto:tinc@tinc-vpn.org" class=""><font color="blue" class=""><u class="">tinc@tinc-vpn.org</u></font></a><br class=""><a href="http://www.tinc-vpn.org/cgi-bin/mailman/listinfo/tinc" class=""><font color="blue" class=""><u class="">http://www.tinc-vpn.org/cgi-bin/mailman/listinfo/tinc</u></font></a></span></font></div></span></font></div></blockquote></div><br class=""><div class=""><br class=""></div><div class=""><br class=""></div></body></html>