Startup scripts

Hi all

We have HP UX 11.23 installed on 4 RISC servers (2 oracle databases, 2 Oracle App Servers) , we are in a construction period , so the power failure may happen more than once a day.
I need to learn how to create an automatic startup services as in Windows, if we know that the services (command lines) owned by two users.

Best Regards

Email removed

All service startups in unix are handled by /sbin/rc? scripts. Just replace the ? by the runlevel. In this case, since it will be applications and databases that will be starting up, the startup script is /sbin/rc3. The /sbin/rc3 script in turn calls different scripts in the /sbin/rc3.d directory. You can write the startup scripts for the dbase/app and put it in the /sbin/rc3.d directory.

If you are new to the unix world, you might want to read up on how the HP-UX system boots.

Startup scripts do not belong in the rc<number>.d directories but in the init.d directory.

In the rc<number>.d directories you create links to a script in the init.d directory.

The format of these links is [S|K]NNN<scriptname

In your /sbin/rc3.d directory could have something like:
lrwxr-xr-x 1 root ... S430nfs.client -> /sbin/init.d/nfs.client

S means it will start an application/service
K means it will kill an application/service

NNN decide the order in which applications/services are started/stopped

The /sbin/rc script will start/stop all applications/services mentioned in your rc<number>.d directories. The run level will decide which which directories are covered.

Looking at the S430nfs.client link, the /sbin/rc script will make sure the script /sbin/init.d/nfs.client is executed with as argument "start".

if a link starts with K the corresponding script in /sbin/init.d is executed with argument "stop" .

So, the scripts in /sbin/init.d should have a "start" and "stop" section. Which section will be executing depends on the argument "start" or "stop".

Besides creating the "start links" it is most importing to create the "kill links" as well.

Whenever you shutdown you want your applications/services to be closed in a proper way and not in the rough way cause the system in the end starts to kill all applications/services like that. A "kill -9" on your Oracle processes could cause damage to your database.

For detailed information check the HP-UX documentation

whenever making changes or creating new services, you have the potential to impact the boot-up process negatively.

Do the research and do it right the 1st time, otherwise you will be booting into single-user to correct...

hiii
how can i run or start ingres Database at hp unix 11i startup
note:
only user called ingres have permission to start Database, can't even run if we use root
Regards,,,
Mohamed Sobhy

So you can add a script in startup and switch to the user to startup ingres DB

like

su - ingres -c PATH/bin/$STARTSCRIPT