Comments on: Created DSpam startup scripts http://switch.richard5.net/2006/11/07/created-dspam-startup-scripts/ How to build your Mac into a internet server using open source software Tue, 17 Jun 2008 18:25:42 +0000 hourly 1 http://wordpress.org/?v=3.2.1 By: Michael http://switch.richard5.net/2006/11/07/created-dspam-startup-scripts/comment-page-1/#comment-6111 Michael Sat, 11 Nov 2006 18:25:58 +0000 http://switch.richard5.net/2006/11/07/created-dspam-startup-scripts/#comment-6111 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> 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>

]]>
By: Michael http://switch.richard5.net/2006/11/07/created-dspam-startup-scripts/comment-page-1/#comment-6021 Michael Sat, 11 Nov 2006 03:23:14 +0000 http://switch.richard5.net/2006/11/07/created-dspam-startup-scripts/#comment-6021 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. 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.

]]>