-1

I have set up launchd to deal with nginx.

Everything was working before el capitan.

I have the file file as /System/Library/LaunchDaemons/nginx.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>Label</key><string>nginx</string>
    <key>Program</key><string>/usr/local/bin/nginx</string>
    <key>KeepAlive</key><true/>
    <key>NetworkState</key><true/>
    <key>StandardErrorPath</key><string>/var/log/system.log</string>
    <key>LaunchOnlyOnce</key><true/>
  </dict>
</plist>

launchctl load -F /System/Library/LaunchDaemons/nginx.plist returns ok but nginx stays disabled.

when I do sudo launchctl list, nginx does not appear on the list.

I'm sure I'm doing something wrong but at the moment I'm completely lost.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
João Pereira
  • 31
  • 1
  • 6

1 Answers1

0

Everything was working before el capitan. I have the file file as /System/Library/LaunchDaemons/nginx.plist

El Capitan introduced System Integrity Protection (SIP).

designed to help prevent potentially malicious software from modifying protected files and folders on your Mac

Files and folders that reside under /System/Library/ and various other paths are reserved for Apple, such as:

• /bin
• /sbin
• /usr
• /System

Your daemon's plist should now reside in /Library/LaunchDaemons.

TheDarkKnight
  • 27,181
  • 6
  • 55
  • 85