Operating System - HP-UX
1830899 Members
3248 Online
110017 Solutions
New Discussion

Re: Adding an Application at System Startup

 
Manjunath Shastry
Frequent Advisor

Adding an Application at System Startup

Greetings Gurus,

I would like to add an Application at System Startup. I am using HP-UX 11.0, how do I go about this ?

Regards,
Manjunath.
A Horse that kicks doesn 't pull
6 REPLIES 6
Steve Steel
Honored Contributor

Re: Adding an Application at System Startup

Hi

11 is like 10

/usr/share/doc/start_up.txt

should be on your box and explains it well


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
steven Burgess_2
Honored Contributor

Re: Adding an Application at System Startup

Hi

You need to add your startup script in /sbin/init.d

Your config file in /etc/rc.config.d

And your stop and start flagfiles in sequencer directories

/sbin/rc0.d < run level
/sbin/rc1.d

etc

Have a look at this doc for more info

http://www4.itrc.hp.com/service/iv/docDisplay.do?docId=/DE_SW_UX_swrec_EN_01_E/Startup.pdf

Here is an example doc for scope_collect

HTH

Steve

take your time and think things through
steven Burgess_2
Honored Contributor

Re: Adding an Application at System Startup

Victor BERRIDGE
Honored Contributor

Re: Adding an Application at System Startup

Hi,
You would have to write a start/stop script that you would put in /sbin/init.d, then create symbolic links : one at your start level as SXXX (XXX is a numeric value corresponding at the order of exection: the greater is last) the other at start -1 as KYYY the system will add the argument start or stop
have a look at the level /sbin/rc3.d for instance and compare with /sbin/rc2.d
For exemple look at my rc.adsm script put at /sbin/init.d:
#!/sbin/sh
export PATH=/usr/sbin:/usr/bin:/sbin
rval=0

case "$1" in
start_msg)
echo "Start ADSM agent"
;;
stop_msg)
echo "Stop ADSM agent"
;;
start)
(dsmc sched >/tmp/dsm.log 2>&1 )&
;;
stop)
for i in $(ps -ef|grep -i dsmc|grep -v grep|awk '{print $2}')
do
kill -9 $i
done
;;
*)
echo "usage: $0 {start|stop}"
rval=1
;;
esac


All the best
Victor
V. V. Ravi Kumar_1
Respected Contributor

Re: Adding an Application at System Startup

Manjunath Shastry
Frequent Advisor

Re: Adding an Application at System Startup

Greetings Gurus,

Thank you for the suggestions, I have decided to implement this by the weekend.

Regards,
Manjunath.
A Horse that kicks doesn 't pull