Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Startup Scripts for HP-UX.

Status
Not open for further replies.

2matto

MIS
Aug 28, 2001
1
US
What is the best way to write a script which will automatically restart my services if/when my server needs to be rebooted? Please don't fear insulting my intelligence. I'm new to Unix administration and know next to nothing. Thanks in advance for the help. -MattO
 
When in doubt, copy :-V

Look in /sbin/init.d for examples.

You should have something like this (where service will need changing) :-

Code:
#ident  "@(#)service"

#       service control
case $1 in
'start')
        su - serviceowner -c "servicestartcommands"
        ;;
'stop')
        su - serviceowner -c "servicestopcommands"
        ;;
*)
        echo "usage: /etc/init.d/service {start|stop}"
        ;;
esac
TandA

Day by day, the penguins steal my sanity.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top