[launchd-dev] Starting Apache: delay to when users/groups are fully loaded?

Cabel Sasser cabel at panic.com
Fri Nov 30 18:33:19 PST 2012


Hey Guys,

We're launching our own httpd via a launchd file on startup.

However, here's the result:

	Nov 30 17:26:54 posh com.panic.httpd[120]: httpd: bad group name web

If we "launchctl start" this same file a few seconds later, it works fine! So it appears that httpd is trying to run before Open Directory or something has fully loaded all of the user/group data…?

What's the best course of action for us? Is there a way to delay a launchd item, or wait, or anything? We're tired of manually starting apache every time the server reboots. :)

(Attached find the .plist file in question.)

Thanks,
Cabel

---

<?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>Disabled</key>
       <false/>
       <key>Label</key>
       <string>com.panic.httpd</string>
       <key>ProgramArguments</key>
       <array>
               <string>/usr/local/apache2/bin/httpd</string>
               <string>-D</string>
               <string>FOREGROUND</string>
       </array>
       <key>RunAtLoad</key>
       <true/>
       <key>KeepAlive</key>
       <false/>
</dict>
</plist>


More information about the launchd-dev mailing list