PostgreSQL 91 does not start automatically
Puneet Kishor
punk.kish at gmail.com
Wed Apr 25 13:56:56 PDT 2012
On Apr 25, 2012, at 3:54 PM, Jeremy Lavergne wrote:
>> My guess is that apache can't resolve that hostname when it is trying to startup at boot (maybe the network isn't up yet, maybe bind isn't running yet, maybe the firewall hasn't been configured yet...)
>
> Can you send us the plist (and possibly wrapper it uses) for apache?
>
> I'm curious if it's missing NetworkState or has some other oddity we've not noticed.
>
Here you go...
$less /Library/LaunchDaemons/org.macports.apache2.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.apache2</string>
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/daemondo</string>
<string>--label=apache2</string>
<string>--start-cmd</string>
<string>/opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper</string>
<string>start</string>
<string>;</string>
<string>--stop-cmd</string>
<string>/opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper</string>
<string>stop</string>
<string>;</string>
<string>--restart-cmd</string>
<string>/opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper</string>
<string>restart</string>
<string>;</string>
<string>--pid=none</string>
</array>
<key>Debug</key><false/>
<key>Disabled</key><true/>
<key>KeepAlive</key><true/>
</dict>
</plist>
----
$less /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper
#!/bin/sh
#
# MacPorts generated daemondo support script
#
#
# Init
#
prefix=/opt/local
#
# Start
#
Start()
{
[ -x /opt/local/apache2/bin/apachectl ] && /opt/local/apache2/bin/apachectl start > /dev/null
}
#
# Stop
#
Stop()
{
[ -r /opt/local/apache2/logs/httpd.pid ] && /opt/local/apache2/bin/apachectl stop > /dev/null
}
#
# Restart
#
Restart()
{
/opt/local/apache2/bin/apachectl restart > /dev/null
}
#
# Run
#
Run(){
case $1 in
start ) Start ;;
stop ) Stop ;;
restart) Restart ;;
* ) echo "$0: unknown argument: $1";;
esac
}
#
# Run a phase based on the selector
#
Run $1
More information about the macports-users
mailing list