Operating System - HP-UX
1835405 Members
2383 Online
110078 Solutions
New Discussion

startup web process at boot

 
iranzo
Frequent Advisor

startup web process at boot

Hello,

problem to start "cimix" web process at system boot .
I execute "cimix start" after signin and it's OK
join rc3.d and cimix script.

Thanks .
Bonjour
8 REPLIES 8
Sridhar Bhaskarla
Honored Contributor

Re: startup web process at boot

What errors are you getting in your /etc/rc.log?. Search for the string cimix in /etc/rc.log.

This could mostly be due to CIMIX_HOME definition.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jim Turner
HPE Pro

Re: startup web process at boot

Hi,

It looks like your start script may be failing during boot because it lacks an environment at that time. You reference $CIMIX_HOME which would typically have no value at that time.

You need all of the following for rc scripts to work reliably:
* Script in /sbin/init.d/
* Start link in /sbin/rc?.d/
* Kill link in /sbin/rc?.d/
* Settings file in /etc/rc.config.d/

Any environment variables that your script references should be defined in your settings file (/etc/rc.config.d/cimix for example) since that file gets sourced before the script is executed.

Cheers,
Jim
Uday_S_Ankolekar
Honored Contributor

Re: startup web process at boot

Hi,

Do you have any related file with cimix in /etc/rc.config.d direactory.

Usually flag start=0 or 1 is set here.

-USA..


Good Luck..
iranzo
Frequent Advisor

Re: startup web process at boot

there is no error in rc.log
and variables are set correctly on the script
at boot "cmxwebdb" seems startup correctly
but client can't connect .
I must start cimix manually .
Bonjour
Steven Gillard_2
Honored Contributor

Re: startup web process at boot

Does your script correctly handle the 'start_msg' and 'start' arguments? Have a look at /sbin/init.d/template, which is the template script you should use to create RC scripts from.

See /usr/share/doc/start_up.txt for more detailed information.

Regards,
Steve
Charles Harris
Super Advisor

Re: startup web process at boot

Hi,

Just a though, if your scripts work okay from a shell, either make sure all executables are explicitly pathed or make sure you set some path variables. Appologies if you've tried this, I can't open the attachment (probs @ our end).

Cheers,


-ChaZ-

Sanjay_6
Honored Contributor

Re: startup web process at boot

Hi Malosse,

try this,

Create a file called SXXXcimix in /sbin/rc3.d directory

Here XXX is any number between 500 and 990

Edit this file and add this line,

su - user_name -c "Your startup command"

Here user_name is the name of the user you are using to start the cimix process manually and "your startup command" refers to the complete syntax of the command you are using to start the process. Do remeber to use the full path to the command. Say the command is located in directory /dir1/dir2 and the command is comman_name and the option you use is "start", "your startup command" should look like "/dir1/dir2/command_name start"

Hope this helps.

regds
Kevin Wright
Honored Contributor

Re: startup web process at boot

here is a script I just wrote to start up a process too..you can just change it to fit your process..it is in /sbin/init.d and linked from rc3 and rc2.d.

USER=tidal
case $1 in
start)
if [[ -f /etc/rc.config.d/tidal ]];then
. /etc/rc.config.d/tidal
else
echo "Defaults file /etc/rc.config.d/tidal missing"
fi
if [[ $TD = 1 ]];then
echo "starting tidal server"
su - $USER -c "/opt/ocsagent/bin/express start"
else
echo "TD is set to 0"
fi;;

stop)
if [[ -f /etc/rc.config.d/tidal ]];then
. /etc/rc.config.d/tidal
else
echo "Defaults file missing"
fi
if [[ $TD = 1 ]];then
echo "shutting down tidal server"
su - $USER -c "/opt/ocsagent/bin/express stop"
fi;;

status)
if [[ -f /etc/rc.config.d/tidal ]];then
. /etc/rc.config.d/tidal
else
echo "Defaults file missing"
fi
if [[ $TD = 1 ]];then
. /opt/ocsagent/.profile
echo "checking status of server"
/opt/ocsagent/bin/express status
fi;;

*)
echo "Usage: tidalsw stop:start:status"
;;
esac