[launchd-dev] Launching a process on demand?
Conrad Taylor
conradwt at gmail.com
Mon Jul 6 22:11:16 PDT 2009
Hi, I'm attempting to configure the MySQL launchd plist file to launch MySQL
process only when needed. At this time, it's launched at boot/startup and
it stays alive. At this time, the script looks as follows:
BEGIN org.macports.mysql5.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Debug</key>
<false/>
<key>Label</key>
<string>org.macports.mysql5</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/daemondo</string>
<string>--label=mysql5</string>
<string>--start-cmd</string>
<string>/opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper</string>
<string>start</string>
<string>;</string>
<string>--stop-cmd</string>
<string>/opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper</string>
<string>stop</string>
<string>;</string>
<string>--restart-cmd</string>
<string>/opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper</string>
<string>restart</string>
<string>;</string>
<string>--pid=none</string>
</array>
<key>RunAtLoad</key>
<false/>
</dict>
</plist>
END org.macports.mysql5.plist:
I changed the above key/value pair to OnDemand/true. Now, the process
doesn't start when I try to access it by doing the following:
> mysql5 <RETURN>
Is there a manual which clearly describes these key/value pairs? I guess
I'm interested in the key/value pair, OnDemand, and when/how
it works.
-Conrad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/launchd-dev/attachments/20090706/39f3a244/attachment.html>
More information about the launchd-dev
mailing list