- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to define a service ?
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
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
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-21-2005 11:30 PM
09-21-2005 11:30 PM
How to define a service ?
I want to run a command which should start and stop along with the server.
This is an application command ( rfcserv -a ABCD -g XYZ -x ASDF01 -t )which should run in the background and work like other services in the system.
Currently I am running the above command manually, but when the server is rebooted, I have to again run the command manually after the system is booted. How do I automate this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2005 11:34 PM
09-21-2005 11:34 PM
Re: How to define a service ?
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2005 11:36 PM
09-21-2005 11:36 PM
Re: How to define a service ?
Hi Charu,
You have to put this command in
1. /etc/rc.config.d/ [ Config file ]
and
2. /sbin/rc#.d/SXX_yourfile [ Execution script link ]
and
3. /sbin/init.d/filename [ Execution script]
Cheers,
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2005 11:39 PM
09-21-2005 11:39 PM
Re: How to define a service ?
You have to rc scripts. Just see the below itrc thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=956990
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2005 11:41 PM
09-21-2005 11:41 PM
Re: How to define a service ?
You can also put it in /etc/inittab for starting at boot time,
like this :
mysv:234:once:sh /mydir/rfcserv -a ABCD -g XYZ -x ASDF01 -t > /dev/null 2>&1
Though configuring through /etc/rc.config.d/ and /sbin/rc#.d/ give you much control to start and stop with system start and shutdown..
Enjoy..
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2005 11:46 PM
09-21-2005 11:46 PM
Re: How to define a service ?
See the /sbin/init.d/
You have link to /sbin/rc
S denotes starting in /sbin/rc
K denotes stoping in /sbin/rc
Look /sbin/init.d/cron file.
Else,
In /etc/rc.config file put as,
rfcserv -a ABCD -g XYZ -x ASDF01 -t 1>/dev/null 2>&1 &
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2005 11:47 PM
09-21-2005 11:47 PM
Re: How to define a service ?
Here is a good doc that will help you configuring auto startup service,
Cheers,
Raj,