- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Startscript
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
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
12-14-2004 10:37 PM
12-14-2004 10:37 PM
Startscript
I need to create a start/stop script for SAPR/3. I know how to create start/stop script on Linux(redhat) but I never created one for hp-ux. Any ideas and suggestions? Thanks for your help.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2004 10:50 PM
12-14-2004 10:50 PM
Re: Startscript
create script in /sbin/init.d directory
and link from /sbin/rc2.d/ to start
and link from /sbin/rc1.d to stop
parameters set in /etc/rc.config.d/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2004 10:55 PM
12-14-2004 10:55 PM
Re: Startscript
look at file
/sbin/init.d/template
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2004 01:23 AM
12-15-2004 01:23 AM
Re: Startscript
/usr/share/doc/start_up.txt
1. Put the on/off flag in:
/etc/rc.config.c/mqseries
#!/sbin/sh
# @(#) $Revision: 72.3 $
# MQ/Series boot startup configuration file
#
# MQSERIES: Set to 1 to start MQ/Series processes
#
MQSERIES=1
then:
chmod 555 mqseries
If you want MQ/Series to start automatically on boot, set this
value to "1" here.
If not, set it to "0" here.
2. Put the startup script in:
/sbin/init.d/mqseries (Attached)
chown 555 mqseries
3. The startup/shutdown script is based on:
/sbin/init.d/template
3. The MQ/Series startup and shutdown scripts are:
/home/mqm/start_ACADV04D
/home/mqm/stop_I_ACADV04D
They look like this:
/home/mqm/start_ACADV04D
#! /bin/ksh
strmqm ACADV04D
strmqcsv ACADV04D
echo START LISTENER|runmqsc ACADV04D
/home/mqm/mqscripts/runmqtrm_EMPAC.sh
/home/mqm/stop_I_ACADV04D
endmqlsr -m ACADV04D
endmqm -i ACADV04D
endmqlsr -m ACADV04D
4. The startup/shutdown script contains the above statements in the
"start" and "stop" blocks.
'start')
if [ -f /etc/rc.config.d/mqseries ] ; then
. /etc/rc.config.d/mqseries
else
echo "ERROR: /etc/rc.config.d/mqseries defaults
file MISSING"
fi
if [ "$MQSERIES" -eq 1 ]; then
# Start MQ/Series
su - mqm -c /home/mqm/start_ACADV04D
echo "mqseries started"
# set_return
rval=0
else
# Skip
rval=2
fi
;;
'stop')
su - mqm -c /home/mqm/stop_I_ACADV04D
echo "mqseries stopped"
rval=0
;;
5. Now we put links in the /sbin/rc4.d/ directory to point to the
script we just created, for startup processing:
Note: We want MQ/Series to come up AFTER Oracle.
cd /sbin/rc4.d/
ln -s /sbin/init.d/mqseries S200mqseries
chmod 555 S200mqseries
6. And we put a link for shutdown processing:
cd /sbin/rc3.d/
ln -s /sbin/init.d/mqseries K800mqseries
chmod 555 K200mqseries
(A rule of thumb is that the total of S and K numbers = 1000.)
7. You can test the scripts by running:
/sbin/init.d/mqseries start
/sbin/init.d/mqseries stop
8. If you want to disable start/stop on boot for this script do:
/usr/sbin/ch_rc -a -p "MQSERIES=0"
Then, of course, don't forget to reenable automatic boot start with:
/usr/sbin/ch_rc -a -p "MQSERIES=1"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2004 01:39 AM
12-15-2004 01:39 AM
Re: Startscript
#!/sbin/sh
# start/stop script for SAP QAS
#
#LSNRCTL=/oracle/QAS/bin/lsnrctl
LSNRCTL=/oracle/QAS/817_64/bin/lsnrctl
QAS_HOME=/home/QASadm
ORA_OWNER=oraQAS
SAP_OWNER=QASadm
rval=0
set_return() {
x=$?
if [ $x -ne 0 ]; then
echo "ERROR CODE $x"
rval=1
fi
}
case "$1" in
start_msg)
echo "Start QAS subsystem"
;;
stop_msg)
echo "Stop QAS subsystem"
;;
start)
if [ -f /etc/rc.config.d/QAS ] ; then
. /etc/rc.config.d/QAS
else
echo "ERROR: /etc/rc.config.d/QAS defaults file MISSING"
fi
# Start the Oracle listener:
# The following command assumes that the oracle login will not prompt the
# user for any values
if [ "$QAS" -eq 1 ]; then
/bin/su - $ORA_OWNER -c "$LSNRCTL start"
/bin/su - $SAP_OWNER -c $QAS_HOME/startsap_svr1007_00
set_return
else
rval=2
fi
;;
stop)
# Stop the Oracle databases:
# The following command assumes that the oracle login will not prompt the
# user for any values
if [ -f /etc/rc.config.d/QAS ] ; then
. /etc/rc.config.d/QAS
else
echo "ERROR: /etc/rc.config.d/QAS defaults file MISSING"
fi
if [ "$QAS" -eq 1 ]; then
/bin/su - $SAP_OWNER -c $QAS_HOME/stopsap_svr1007_00
/bin/su - $ORA_OWNER -c "$LSNRCTL stop"
set_return
else
rval=2
fi
;;
esac
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2004 01:55 AM
12-15-2004 01:55 AM
Re: Startscript
Maybe this link will help,
http://devresource.hp.com/drc/STK/docs/archive/start_up.pdf
Hope this helps.
Regds