Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Administering a System: Booting and Shutdown
Customizing Start-up and Shutdown
Chapter 5518
print "failed to start $web_productname_daemon"
rval=2
fi
;;
'stop')
killproc $web_productname_daemon
;;
*)
echo "usage: $0 {start|stop|start_msg|stop_msg}"
rval=1
;;
esac
exit $rval
Then create a configuration file, /etc/rc.config.d/web_productname,
to tell the above script where to find the web_productname daemon and
whether or not to start it up (1=yes; 0=no):
#!/sbin/sh#
# v1.0 web_productname startup/kill config
# WEB_PRODUCTNAME: Set to 1 to start
# web_productname_daemon
# WEB_PRODUCTNAMEHOME: home dir for web_productname
WEB_PRODUCTNAME=1
WEB_PRODUCTNAMEHOME=/msw/web_productname/binhp
NOTE Setting the start-up variable (WEB_PRODUCTNAME in this case) to 0, rather
than deleting the script, is the way to remove a subsystem from the
start-up sequence. This is particularly important in the case of HP and
third-party scripts; do not edit them, delete them or move them; simply
change the variable in the appropriate script under /etc/rc.config.d/
to 0 if you don’t want the corresponding start-up script to run.
Step 3. Create symbolic links that cause the script to be run at the right
place in the boot and shutdown sequences.