- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Load script in Boot
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
тАО07-07-2000 11:54 AM
тАО07-07-2000 11:54 AM
My server is HP9000 and HP-UX 11.0
thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2000 11:57 AM
тАО07-07-2000 11:57 AM
Re: Load script in Boot
where XXX is the order to start lowest first
For the shutdown script, create it in the /sbin/rc2.d directory named KYYYprogram-name
where YYY is the order to stop lowest first.
Brian
<*(((>< er
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2000 12:28 PM
тАО07-07-2000 12:28 PM
Solution1) Copy the file /sbin/init.d/template to the script name you wish.
2) Edit that script, adding the appropriate code in the start and stop sections.
3) Create a resource file in /etc/rc.config.d that sets an environmental variable to 0 or 1. Use 1 to start the script automatically. The name of this environmental variable should match the name you supply for "CONTROL_VARIABLE" in the /sbin/init.d/script.
4) Finally, add soft links in the /sbin/rcX.d directories to control when in teh start sequence you wish the script to be activated.
ex: To start the script at run level 3 issue:
ln -s /sbin/init.d/script /sbin/rc3.d/S800script
ln -s /sbin/init.d/script /sbin/rc2.d/K200script
By convention, the numbers should add up to 1000. This ensures that processes are stopped in the inverse order of when they are started.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2000 10:42 PM
тАО07-09-2000 10:42 PM
Re: Load script in Boot
i give you a apache start/stop script at the attachment (put it in /sbin/init.d/apache).
Greetings
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2000 12:24 AM
тАО07-10-2000 12:24 AM
Re: Load script in Boot
What helps was a script in /sbin/rc2.d like follows:
----
#!/sbin/sh
#
PATH=/usr/sbin:/usr/bin:/sbin:/opt/thttpd/sbin
export PATH
echo 'cd /ansys' > /usr/local/bin/start_http
echo '/opt/thttpd/sbin/thttpd -r -d /ansys -u www &' >> /usr/local/bin/start_http
/sbin/chmod 755 /usr/local/bin/start_http
/usr/bin/at -f /usr/local/bin/start_http now + 2 minutes
echo "Starting thttpd"
exit 0
------
Note that the server is started 2 minutes after booting by cron.