cancel
Showing results for 
Search instead for 
Did you mean: 

Startup script issue

sen_ux
Valued Contributor

Startup script issue

Hi,

I have an application startup script which does not start properly when the server comes up.But it starts fine if we run it manually.
Upon checking the error logs, we found errors with variables.
Would it be fine to source the varibales to this script.? If this is a source issue, how does it work once the server is fully up and running the script manually.?

Regards
SEN
9 REPLIES
avizen9
Esteemed Contributor

Re: Startup script issue

Hello Sen,
what is script which you need to start with server starup?

you need to check /sbin/init.d
when hpux system startup /etc/inittab calls /sbin/rc, which in turn calls execution scripts to start subsystems.There are four components to this method of startup and shutdown: /sbin/rc, execution scripts, configuration variable scripts, and link files.
/sbin/rc
This script invokes execution scripts based on run levels. It is also known as the startup and shutdown sequencer script.
Execution scripts
These scripts start up and shut down various subsystems and are found in the /sbin/init.d directory.

Dennis Handly
Acclaimed Contributor

Re: Startup script issue

>Would it be fine to source the variables to this script?

Why not.

>If this is a source issue, how does it work once the server is fully up and running the script manually?

Are you expected to define these variables in /etc/profile or ~/.profile?
Suraj K Sankari
Honored Contributor

Re: Startup script issue

Hi,
>>I have an application startup script

Where you have put yout startup script ?

Suraj
sen_ux
Valued Contributor

Re: Startup script issue

Hi ,

1.Application is jBoss.

2.The script refers variables from configuration files placed in application directory.If I source these configuration files, would it work.?

3.startup script is in /sbin/init.d
link is palced in /sbin/rc3.d
config file in /etc/rc.config.d


Thanks
SEN
Dennis Handly
Acclaimed Contributor

Re: Startup script issue

>2. The script refers variables from configuration files placed in application directory. If I source these configuration files, would it work?

rc scripts should only use variables defined in /etc/rc.config.d/. If you need variables from your application directory, you should source them from your file in /etc/rc.config.d.
sen_ux
Valued Contributor

Re: Startup script issue

Hi Dennis,

Can I source it from the existing configuration file or I have to copy the application configuration files to /etc/rc.config.d .?

Thanks
SEN
avizen9
Esteemed Contributor

Re: Startup script issue

Hello sen,
you can copy from any existing script, but you need to modify it accordingly.

here is example of script.

http://support.bb4.com/archive/200101/msg00183.html

more information for this here.
http://www.unixhub.com/docs/hpux/hpux_boot.html

hope this will help
Dennis Handly
Acclaimed Contributor

Re: Startup script issue

>Can I source it from the existing configuration file or I have to copy the application configuration files to /etc/rc.config.d/?

Either one, I would do the former, so you don't have two copies to maintain.
sen_ux
Valued Contributor

Re: Startup script issue

Thanks, I ll try this..