Hi All, I always wondered why my apache would not start at boot-time... Now I updgraded to MacPorts apache2 version 2.2.6 and take a quick look into it. Apparently one has to edit /opt/local/etc/LaunchDaemons/org.macports.apache2/ org.macports.apache2.plist and change the Disabled key to false? <key>Disabled</key><false/> Is this true? If so, this should be documented in the info-message given upon installation of apache2 via MacPorts: ########################################################### # A startup item has been generated that will aid in # starting apache2 with launchd. It is disabled # by default. Execute the following command to start it, # and to cause it to launch at startup: # # sudo launchctl load -w /Library/LaunchDaemons/ org.macports.apache2.plist ########################################################### This message indicates, launchctl would take care of that stuff. It doesn't, at least not for me. If, however, the user has to do this manually, it should be said at that point. If I am overlooking something, I am happy to learn about it;) Schöne Grüße, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen- Kuepper.de Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D Sex, drugs and rock-n-roll
Hi Jochen, On Oct 30, 2007, at 9:35 AM, Jochen Küpper wrote:
Hi All,
I always wondered why my apache would not start at boot-time... Now I updgraded to MacPorts apache2 version 2.2.6 and take a quick look into it. Apparently one has to edit /opt/local/etc/LaunchDaemons/org.macports.apache2/ org.macports.apache2.plist and change the Disabled key to false? <key>Disabled</key><false/>
Is this true? If so, this should be documented in the info-message given upon installation of apache2 via MacPorts:
Actually, the -w parameter to the load subcommand, as given below, will remove that disabled flag. James
########################################################### # A startup item has been generated that will aid in # starting apache2 with launchd. It is disabled # by default. Execute the following command to start it, # and to cause it to launch at startup: # # sudo launchctl load -w /Library/LaunchDaemons/ org.macports.apache2.plist ###########################################################
This message indicates, launchctl would take care of that stuff. It doesn't, at least not for me. If, however, the user has to do this manually, it should be said at that point.
If I am overlooking something, I am happy to learn about it;)
Schöne Grüße, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen- Kuepper.de Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D Sex, drugs and rock-n-roll
_______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
Jochen Küpper <jochen@fhi-berlin.mpg.de> writes:
I always wondered why my apache would not start at boot-time... Now I updgraded to MacPorts apache2 version 2.2.6 and take a quick look into it. Apparently one has to edit /opt/local/etc/LaunchDaemons/org.macports.apache2/ org.macports.apache2.plist and change the Disabled key to false? <key>Disabled</key><false/>
Is this true? If so, this should be documented in the info-message given upon installation of apache2 via MacPorts:
########################################################### # A startup item has been generated that will aid in # starting apache2 with launchd. It is disabled # by default. Execute the following command to start it, # and to cause it to launch at startup: # # sudo launchctl load -w /Library/LaunchDaemons/ org.macports.apache2.plist ###########################################################
This message indicates, launchctl would take care of that stuff. It doesn't, at least not for me. If, however, the user has to do this manually, it should be said at that point.
If I am overlooking something, I am happy to learn about it;)
Hi Jochen, sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist is intended to remove the "Disabled" tag, and always has for me. And unload will place it there again. I'm not sure why it wouln't do that for you though. Mark
Ji James, Mark, thank you for your quick replies! On 30.10.2007, at 19:55, markd@macports.org wrote:
sudo launchctl load -w /Library/LaunchDaemons/ org.macports.apache2.plist
is intended to remove the "Disabled" tag, and always has for me. And unload will place it there again. I'm not sure why it wouln't do that for you though.
Okay, sorry for me being to quick here! Yes, it does work as you describe for me as well. I was put off by the fact that it moved the flags somewhere else (before the "array") inside the file. However, it does still not restart apache at boot-time. Is there more I have to do? I am still not moved to Mac OS X (from my Unix experience) in that respect and don't really know how all this is done here... Greetings, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen- Kuepper.de Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D Sex, drugs and rock-n-roll
Jochen Küpper <jochen@fhi-berlin.mpg.de> writes:
Yes, it does work as you describe for me as well. I was put off by the fact that it moved the flags somewhere else (before the "array") inside the file.
However, it does still not restart apache at boot-time. Is there more I have to do? I am still not moved to Mac OS X (from my Unix experience) in that respect and don't really know how all this is done here...
Have you renamed httpd.conf.sample to httpd.conf? Also, you can start apache manually and you an see any error messages. sudo /opt/local/apache2/bin/apachectl start Mark
On Oct 30, 2007, at 16:27, Jochen Küpper wrote:
On 30.10.2007, at 19:55, markd@macports.org wrote:
sudo launchctl load -w /Library/LaunchDaemons/ org.macports.apache2.plist
is intended to remove the "Disabled" tag, and always has for me. And unload will place it there again. I'm not sure why it wouln't do that for you though.
Okay, sorry for me being to quick here!
Yes, it does work as you describe for me as well. I was put off by the fact that it moved the flags somewhere else (before the "array") inside the file.
However, it does still not restart apache at boot-time. Is there more I have to do? I am still not moved to Mac OS X (from my Unix experience) in that respect and don't really know how all this is done here...
Maybe this is the restart-netchange problem. On some systems, the OS may try to load software like apache before the network is initialized, thus apache would fail to start properly. There's an option you can put in the plist to restart the service when the network changes. MacPorts trunk has been updated to provide a way for portfiles to request that key in the plist, but we can't add it to the portfile until that code from trunk makes its way into a released version of MacPorts. You could manually add it to the plist and see if that helps.
On Apr 9, 2007, at 10:22 AM, James Berry wrote:
You might try adding the option "--restart-netchange" to the daemondo invocation in [the plist]:
<string>--restart-netchange</string>
On 30.10.2007, at 23:12, Ryan Schmidt wrote:
On Oct 30, 2007, at 16:27, Jochen Küpper wrote:
On 30.10.2007, at 19:55, markd@macports.org wrote:
sudo launchctl load -w /Library/LaunchDaemons/ org.macports.apache2.plist
is intended to remove the "Disabled" tag, and always has for me. And unload will place it there again. I'm not sure why it wouln't do that for you though.
Okay, sorry for me being to quick here!
Yes, it does work as you describe for me as well. I was put off by the fact that it moved the flags somewhere else (before the "array") inside the file.
However, it does still not restart apache at boot-time. Is there more I have to do? I am still not moved to Mac OS X (from my Unix experience) in that respect and don't really know how all this is done here...
Maybe this is the restart-netchange problem.
Apparently not... I have now rebootet the system after changing the file /Library/LaunchDaemons/org.macports.apache2.plist to the following including the --restart-netchange option (well, this is the version after I started it manually). Still does not start apache at startup;( <?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>Debug</key> <false/> <key>Label</key> <string>org.macports.apache2</string> <key>OnDemand</key> <false/> <key>ProgramArguments</key> <array> <string>/opt/local/bin/daemondo</string> <string>--label=apache2</string> <string>--restart-netchange</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>RunAtLoad</key> <false/> </dict> </plist> Any suggestions are welcome. Greetings, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen- Kuepper.de Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D Sex, drugs and rock-n-roll
participants (4)
-
James Berry
-
Jochen Küpper
-
markd@macports.org
-
Ryan Schmidt