web-dev-qa-db-ja.com

PHP-FPMの自動起動

私の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>org.macports.php-fpm</string>
<key>ProgramArguments</key>
<array>
    <string>/opt/local/bin/daemondo</string>
    <string>--label=php-fpm</string>
    <string>--start-cmd</string>
    <string>/opt/local/sbin/php-fpm</string>
    <string>;</string>
    <string>--pid=fileauto</string>
    <string>--pidfile</string>
    <string>/opt/local/var/run/php-fpm/php-fpm.pid</string>
</array>
<key>Debug</key><false/>
<key>Disabled</key><true/>
<key>OnDemand</key><false/>
</dict>
</plist>

再起動後、自動的に読み込まれません。私はまだphp-fpmを手動で起動する必要があります。 RunAtLoadなどをアンロードして追加しようとしましたが、運が悪かったので、これらのlaunchctlコマンドを両方とも試しました。

Sudo launchctl load -F /Library/LaunchDaemons/org.macports.php-fpm.plist
Sudo launchctl load -w /Library/LaunchDaemons/org.macports.php-fpm.plist
3
Seth

<key>Disabled</key><true/>を削除し、<key>RunAtLoad</key><true/>を追加してみてください。

1
Gordon Davisson