The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 10-08-2008
avronius avronius is offline VIP Member  
VIP Member
  
 

Join Date: Apr 2008
Location: Calgary
Posts: 305
Good point Broli - since you are already using sudo, create the shutdown scripts (one script for all hosts - perform the OS check locally), and give mbaker the right to run the shutdown script.
Then, your script would simply be:
Code:
for host in `cat $hostlist` do; ssh $host emergencyShutdown <flags/options>;done