From: Peter P. <ro...@ri...> - 2017-02-17 01:45:20
|
On Thu, Feb 16, 2017 at 10:35:12PM +0100, Matthias Andree wrote: > Am 16.02.2017 um 14:45 schrieb Chris: > >> On Sun, 2017-02-12 at 16:25 +0100, Matthias Andree wrote: > >>> while [ -e /path/to/fetchmail.pid ] ; do sleep 1 ; done > > Adding that one line to the script got it to run perfectly Matthias, > > thanks so much for the help > > Hi Chris, > > good to know that, but you need to keep an eye on it if you're using it > as is. > If the previous fetchmail instance *crashed* and left the fetchmail.pid > file behind, this loop will wait forever without starting fetchmail anew. So this looks more and more like I should brush up my stalepid tool from years ago and let people actually know about it, doesn't it... Chris, could you take a look at https://devel.ringlet.net/sysutils/stalepid/ and see if this utility will help you? Something like: stalepid /path/to/fetchmail.pid fetchmail ...should be able to do the trick; afterwards, if fetchmail.pid no longer exists, this means that it was stale. Of course, if stalepid fails to work for you for some reason, please do not hesitate to let me know! G'luck, Peter -- Peter Pentchev ro...@ri... ro...@Fr... pp...@st... PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 |