标签归档:launchctl

nginx + php for mac 开机自动运行

sudo launchctl load -w /opt/local/etc/php5/php.plist

sudo vim /Library/LaunchDaemons/com.xxx.yyy.plist

<?xml version=’1.0′ encoding=’UTF-8′?>
<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN”
“http://www.apple.com/DTDs/PropertyList-1.0.dtd” >
<plist version=’1.0′>
<dict>
<key>Label</key><string>com.xxx.yyy</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/php-cgi</string>
<string>-q</string>
<string>-b</string>
<string>127.0.0.1:900</string>
</array>
<key>Debug</key><false/>
<key>Disabled</key><true/>
<key>OnDemand</key><false/>
</dict>
</plist>

sudo launchctl load -w /Library/LaunchDaemons/com.xxx.yyy.plist