Fetchmailrc launchd configuration
Greetings,
I want to make launchd act like cron for my fetchmail and hence I'm trying to write my first launchd xml script. Although I've read a lot, apparently the task is proven a bit more difficult that I imagined.
Given the fact that as a user I can run fetchmail through the command line with issues and get all my emails to $HOME/Mail/ for mutt to see, I decided to create a launchd xml startup file and place it on $HOME/Library/LaunchDaemons/ .
So here is my script
[code=xml]
Disabled
KeepAlive
Label
org.macports.fetchmail
Program
/usr/bin/fetchmail
ProgramArguments
--fetchmailrc=/Users/atma/.fetchmailrc
--pidfile=/Users/atma/.fetchmail/fetchmail.pid
--nodetach
RunAtLoad
[/code]
This is the last xml file I've made. The prior one, which made more sense to me was with time interval. But it did not work either. All the files I create don't work and when I load them I get the same string of errors:
launchd[1123]: org.macports.fetchmail: exited with exit code: 1
launchd[1123]: org.macports.fetchmail: 9 more failures without living at least 60 seconds will cause job removal
and a weird bonjour error that I can't replicate right now and I can't find on syslog. Since I plan to write a few more launchd scripts... Can someone explain what am I missing here?
Thanks in advance,
regards