Operating System - HP-UX
1748074 Members
5287 Online
108758 Solutions
New Discussion

start up application scripts into start up of the server

 
itrc55
Regular Advisor

start up application scripts into start up of the server

Hi,

 

i want to include the start up application scripts into start up of the server so that our application can be started with server boot up.

 

How can i do it that ?

 

Thanks

3 REPLIES 3
Pete Randall
Outstanding Contributor

Re: start up application scripts into start up of the server

Take a look at the man page for rc.  It's all documented there.


Pete
donna hofmeister
Trusted Contributor

Re: start up application scripts into start up of the server

(what pete said!)

 

you should have a file called -- /sbin/init.d/template -- on your system.  You can use that as a starting point.  You can also use any existing scripts.  Whatever file you decide to start with, copy it to a new file name.

 

Inside your new RC file, you'll see places to add a start message, a stop message, the start command, and the stop command. These messages and commands are used by the system during the boot up process. There is also a check for a $CONTROL_VARIABLE before the start and stop commands are issued. This $CONTROL_VARIABLE needs to be named by you, and a corresponding file in the /etc/rc.config.d directory defines the variable as 1 or 0. If the variable is defined as 1, then the subsystem is started up at boot time. If it is not set to 1, then the subsystem is not started. This file makes it very easy to add/subtract the subsystem from the boot sequence.

James R. Ferguson
Acclaimed Contributor

Re: start up application scripts into start up of the server

Hi:

 

To add, aside from following the configuration/instructions you will find in the manpages for 'rc(1M)' be very sure that you do not store backup copies of any of the scripts in the '/etc/rc.config.d' directory *unless* carefully follow the documented in the '/etc/rc.config' script!

 

Regards!

 

...JRF...