Re: Script vs command line behaviour
On Wednesday 12 October 2016 09:40:57 Mark Fletcher wrote:
> On Wed, Oct 12, 2016 at 08:40:12AM -0400, Greg Wooledge wrote:
> > On Wed, Oct 12, 2016 at 09:34:22PM +0900, Mark Fletcher wrote:
> > > # The systemctl stop for svnserve may not work as I haven't got
> > > around to # making a stop script for it.
> > > # So kill the process the old fashioned way
> > > ps -ef | grep svnserve | grep -v grep | awk '{print $2}' | xargs
> > > kill -9
> >
> > Please consider replacing this with some variant of:
> >
> > pkill svnserve
> >
> > And stop using -9 (SIGKILL). Forever. Pretend it never existed.
>
> ...Any thoughts on what is preventing the restart of fetchmail from
> working?
>
> Mark
My best guess is a stale lock file, leftover because you used the brute
force kill, so it did not exit gracefully, cleaning up after itself. My
own scripts restart fetchmail on a nightly basis so fetchmail can't muck
up an sa-train-bayes run. It uses "killall fetchmail", then waits 20
seconds for any mail in the spamd pipes to drain, and when the sa-learn
bits are completed:
# and restore fetchmail but let the disks synch first
sleep 6
fetchmail -d 180 --fetchmailrc /home/gene/.fetchmailrc
This has not failed in many years.
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Reply to: