- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Background script to be run
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
Forums
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
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
тАО09-27-2010 02:04 AM
тАО09-27-2010 02:04 AM
I am working on sap and IVM environment. I want to set the following script in background always. If server is reboot in that case also the script should automatically starts.
cd /usr/sap/saprouter
./saprouter -r -K "p:CN=rusolman, OU=0001128964, OU=SAProuter, O=SAP, C=DE"
Regards
Prashant
Solved! Go to Solution.
- Tags:
- rc(1M)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2010 03:45 AM
тАО09-27-2010 03:45 AM
Re: Background script to be run
If you want the script to run all the time and to be automatically started, you might want to look into rc(1m):
http://docs.hp.com/en/B2355-60130/rc.1M.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2010 04:15 PM
тАО09-27-2010 04:15 PM
Re: Background script to be run
ln -s /sbin/init.d/sap /sbin/rc4.d/s900sap
ln -s /sbin/init.d/sap /sbin/rc3.d/k100sap
vi /sbin/init.d/sap
look for the section that says start command and put the line in there.
look for the section that says stop command and put a command to stop the application there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2010 04:35 PM
тАО09-27-2010 04:35 PM
SolutionIf you need to ensure the router is always running you could get the init process to manage it. Put a line similar to this into /etc/inittab.
sap1:2345:respawn:/usr/sap/saprouter/saprouter -r -K "p:CN=rusolman, OU=0001128964, OU=SAProuter, O=SAP, C=DE"
Where "sap1" is a unique label. The process will always be started in any of the listed run levels (2,3,4 or 5)
and then call the following command to start it:
init q
See the documentation for more information:
man init
man inittab
To inhibit the process from running, comment out the line in /etc/inittab, call init q and then kill any running saprouter processe(s).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-27-2010 11:09 PM
тАО09-27-2010 11:09 PM
Re: Background script to be run
Thanks for your reply. i put the following entry in /etc/inittab and run init q but it was not worked out.
sap1:2345:respawn:/usr/sap/saprouter/rulsaprouter/saprouter -r -K "p:CN=rusolman, OU=0001128964, OU=SAProuter, O=SAP, C=DE"
Please advice any other changes require ?
Thanks & Regards
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2010 06:52 AM
тАО09-28-2010 06:52 AM
Re: Background script to be run
1) did you enter the string as a one-liner in /etc/inittab?
2) Any messages about your entry in the syslog?
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2010 10:25 PM
тАО09-28-2010 10:25 PM
Re: Background script to be run
1) Yes, the string is in one line
2) NO.
Prashant