1834150 Members
3071 Online
110064 Solutions
New Discussion

Re: startup script

 
navin
Super Advisor

startup script

Hello All,

I have to setup a startup script for starting http. manually i start /opt/hpws/bin/httpd -k start. How can i set up this in startup script
thanks much
Learning ...
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: startup script

Hi:

Follow the guidlelines laid out in the 'rc(1M)' manpages or read this excellent (sill relevent) whitepaper:

http://docs.hp.com/en/934/startup.pdf

Be sure to follow (ideally begin with) the '/sbin/init.d/template' template for any startup/shutdown scripts you write!

Regards!

...JRF...
Jeff_Traigle
Honored Contributor

Re: startup script

Actually, the startup script probably already exists since you're using HP's Apache. Configure /etc/rc.config.d/hpws_apache32conf (or corresponding file for whatever version you're running) and you should be set.
--
Jeff Traigle
navin
Super Advisor

Re: startup script

is the apachectl start and the httpd -k start does the same thing?
Thanks
Learning ...
Ivan Krastev
Honored Contributor

Re: startup script

There are the same - http://httpd.apache.org/docs/2.0/programs/apachectl.html :

start
Start the Apache httpd daemon. Gives an error if it is already running. This is equivalent to apachectl -k start.

regards,
ivan
Ralph Grothe
Honored Contributor

Re: startup script

If you installed the official HP Apache depot then you already are supplied with an init script, depending on the depot release, often named /sbin/init.d/hpws_apache.
This simply calls the SERVER_ROOT/bin/apachectl script, the startup script that the Apache project distributes along with the source tarball.
If you look at apachectl you will notice that it is a bit out of date and has some quirks that often require manual editing and adaptations to ones system (e.g. the status switch block requires an installed lynx but can easily be changed to work with wget, curl, Perl lwp-request or whatever is suitable to fetch the index (or any other more suitable) page of your website.
Also for it to work without any modifications to the apachectl you would configure your webserver to load mod_status and add (or uncomment) a context block for the server-status URL.
I think this switch should therefore better be renamed to "monitor)" because the usual "status)" should only display a line telling if the parent httpd process is running possibly along with its PID.
I think this would more conform with OCF standards.
Madness, thy name is system administration