The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 09-13-2007
ajcannon ajcannon is offline
Registered User
 

Join Date: Aug 2007
Location: Binfield, Berkshire. UK
Posts: 91
Server shutdown and restart

The simplest way is to use and editor (vi ?) to create something like....

#!/bin/ksh
#################
# Server shutdown
#################
#
command1
command2
.
.
commandn



save this and endsure the script file is executable using chmod +x <scriptname>

then execute it by simply running the scriptfile - the same would apply for your shutdown script.

Depending on your situation it *may* not be quite as simple as this but I hope this gets you started
Reply With Quote