7
Nov
2006
Just finished writing the next part of the DSpam documentation that was needed. It still needed a proper startup and shutdown procedure. So I started in writing a shell script that would take care of it and use that in the launchd scripts which would take care of starting DSpam at boot time.
It turned out to be simpler than I thought, I only needed to uncomment: ServerPID /var/run/dspam.pid
in the dspam.conf file to get a proper pid file which I could use to feed the kill command as Mac OS X hasn’t got the killproc command. When I had this figured out the rest was simple. Read the results on the starting DSpam page and use it to your liking.
Related entries:
- No related posts
- No related posts
November 11th, 2006 at 5:23 am
Actually, those are StartupItems, which are different from Launchd’s Agents.
I was having some problems with the Apache and MySQLCOM startup items and was about to switch my ISP in a box setup to that startup manager.
November 11th, 2006 at 8:25 pm
Save this as /Library/LaunchDaemons/org.mysql.MySQL5.plist and launchd will take care of all dependencies and keep the process up.
You need a slightly different version for Apache2, since launchd doesn’t get along with apps that shut down after less than 60 seconds. The plist is (almost) the same, but I’m calling a shell script that checks every 30 seconds to see if any httpd processes exist. It exits (letting launchd launch apache2) if it doesn’t find any.
Not sure if the other processes which you’ve got startupItems for should use launchd, I only used it to get around startup problems.
If the xml below doesn’t show up, let me know and I can email it to you.
<code>
GroupName
admin
Label
MySQL5
OnDemand
Program
/usr/local/mysql/bin/mysqld_safe
RunAtLoad
ServiceDescription
Launches the MySQL database server
UserName
root
</code>