- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- application startup-shutdown scripts--hp-ux 11i v2
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2006 12:22 AM
тАО06-16-2006 12:22 AM
application startup-shutdown scripts--hp-ux 11i v2
What is the best place to put these scripts to ensure graceful startup/shutdown of the applications? Is /sbin/init.d is the right place? If it is how do I check the server status like "start" or "stop" to call proper application scripts in my script?
Thanks.
Rajim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2006 12:28 AM
тАО06-16-2006 12:28 AM
Re: application startup-shutdown scripts--hp-ux 11i v2
# man rc
rgs,
ran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2006 12:31 AM
тАО06-16-2006 12:31 AM
Re: application startup-shutdown scripts--hp-ux 11i v2
Note only is that the best place, but is the proper place.
For a complete understanding of the startup/shutdown paradigm from 10.x through 11.23, see:
http://docs.hp.com/en/934/startup.pdf
See also, the manpages for 'rc(1M) and its referenced manpages.
http://docs.hp.com/en/B2355-60105/rc.1M.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2006 12:31 AM
тАО06-16-2006 12:31 AM
Re: application startup-shutdown scripts--hp-ux 11i v2
Copy /sbin/init.d/template to /sbin/init.d/yourapp and customize. Then create start (S) and kill (K) scripts (symlinks to /sbin/init.d/yourapp) for the appropriate runlevels in the /sbin/rc?.d directories.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2006 12:34 AM
тАО06-16-2006 12:34 AM
Re: application startup-shutdown scripts--hp-ux 11i v2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2006 12:40 AM
тАО06-16-2006 12:40 AM
Re: application startup-shutdown scripts--hp-ux 11i v2
It is indded the right placee. In fact there is a template file in directory to help you build the script correctly. You will include bothe stop and start commands in one scripts
Then in one on the /sbin/rcX.d directories you link to your /sbin/init.d script. The script will either stop or start depending on the first letter of the script. (S or K)
Finally, you put a file in /etc/rc.config.d containing a flag that tells the script to run or not run.
It sounds complicated, but actually is quite easy - look at an eisting app for an example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2006 01:55 AM
тАО06-16-2006 01:55 AM
Re: application startup-shutdown scripts--hp-ux 11i v2
One more question before assigning the points:
I want the
application to shutdown first thing when system going down.
application to start last when the system is coming up
If I put the link like below will it work?
/etc/rc3.d/K750app------>/sbin/init.d/app
/etc/rc3.d/S750app------->/sbin/init.d/app
Thanks.
Raji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2006 01:59 AM
тАО06-16-2006 01:59 AM
Re: application startup-shutdown scripts--hp-ux 11i v2
It depends if K750/S750 is the highest number in rc3.d.
Then this should be oke.
GoodLuck
Darrel Louis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2006 02:27 AM
тАО06-16-2006 02:27 AM
Re: application startup-shutdown scripts--hp-ux 11i v2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2006 02:32 AM
тАО06-16-2006 02:32 AM
Re: application startup-shutdown scripts--hp-ux 11i v2
To have your application be one of the last things started, create a link in '/sbin/rc3.d' like 'S750' (if that is unused). This assumes that run-level-3 is your normal, highest run-level. Look at your '/etc/inittab' to verify this.
If a start script runs in sequence level 'N', then its corresponding kill script should be placed at sequence 'N-1'.
Remember too, the "rule of 1000". A kill script and a start script should differ by this number. Since you want to reverse the order of startup during a shutdown, 1000-750 = 250, so your startup as 'S750' should shutdown at 'K250'.
Following this last rule means that you preserve the relationship between various dependent startup and shutdown tasks.
Regards!
...JRF...