- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: new init.d startup script
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
02-28-2005 08:11 AM
02-28-2005 08:11 AM
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2005 12:41 PM
02-28-2005 12:41 PM
Re: new init.d startup script
The manual page should give you enough info to build your stratup script. If there's a template for RH the init.d man page should point you to it. I'm more familiar w/ SuSE and their template it /etc/init.d/skeleton... You should check out the man page.
If you can't find the template on RH, copy en existing script and make your changes. The script will go in /etc/init.d w/ symbolic links in /etc/init.d/rc?.d/K???script or S???script. Where rc?.d is the runlevel to start/stop and K???script is for the shutdown, S??? is run at startup. Example
/etc/init.d/myscript
ln -s /etc/init.d/myscript /etc/init.d/rc3.d/S600myscript
ln -s /etc/init.d/myscript /etc/init.d/rc2.d/K600myscript
"myscript" will startup in runlevel 3... man page should cover it all.
hope this helps,
-denver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2005 08:35 PM
02-28-2005 08:35 PM
SolutionThis webpage below will tell you all you need. I think there used to be a RPM, which had a bare bone application startup/shutdown script. But the name is lost to me as thats a long time ago (+3 years ago)
http://www.sensi.org/~alec/unix/redhat/sysvinit.html
Another usefull manualpage is: "man chkconfig"
But if that all fails, try to find one that almost has what you need. And copy and change that one to your needs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2005 04:43 PM
05-25-2005 04:43 PM
Re: new init.d startup script
Place the chkconfig and description lines lines at the top of the script. See code below.
As root run chkconfig --add scriptname
To verify run chkconfig --list scriptname
That should show you what runlevels the script will start/stop.
You can also utilize the service command once this is done.
service scriptname start/stop/status
#!/bin/bash
################################################################
# Oracle startup/shutdown script
# chkconfig: 2345 99 10
# description: starts and stops the Oracle databases
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2005 08:30 AM
05-26-2005 08:30 AM