Operating System - HP-UX
1833756 Members
2821 Online
110063 Solutions
New Discussion

starting scripts when server boots

 

starting scripts when server boots

Hi folks,
Please, How to do for starting scripts when my server boots .... I'm using HP 11.11

Could you send me any procedure ...

Cheers

Christian
Christian Aguilar
6 REPLIES 6
DCE
Honored Contributor

Re: starting scripts when server boots

Use the template in /usr/sbin to enter the start and stop commands for the script

Link the start/stop script you created to the appropriate run levels

i.e.
/sbin/rc3.d/S900scriptname
/sbin/rc2.d/K100scriptname

Remember to put a flag in /etc/rc.config.d directory as well

It sounds complicated, but is actually quite easy. Look at existing files for guidance
Piergiacomo Perini
Trusted Contributor

Re: starting scripts when server boots

Hi Christian,

go in /sbin/init.d and take a look
at
"template"
just to have a idea/procedure.

Hope that helps
regards
Geoff Wild
Honored Contributor

Re: starting scripts when server boots

And the official doc:

http://docs.hp.com/en/B2355-90912/B2355-90912.pdf

See Chapter 5 "Administering a System" - in particular, "Customizing Start-up and Shutdown" section.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
James R. Ferguson
Acclaimed Contributor

Re: starting scripts when server boots

Hi Christian:

The "original", definitive whitepaper on this subject(AFAIK) appeared during the 9x to 10x rework HP-UX underwent. In fact, it's available on the docs.hp.com website under 10.x:

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

Regards!

...JRF...
Scot Bean
Honored Contributor

Re: starting scripts when server boots

If you don't want to mess with custom /sbin/init.d/* scripts, starting your applications in /etc/inittab is easier.
Raj D.
Honored Contributor

Re: starting scripts when server boots

Hi Christian ,

Check this out for a good understading of startup of programs through /sbin/init.d/ and /sbin/rcx.d/S...
(where x is 0 1 2 3 4 )

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "