Linux shell script that issue "shutdown" to a list of servers in a file

About the client

United States

Posted on Nov 21, 2011 / Est. budget $ 100 / Project closed

Awarded winner(s):

adego76
adego76

I need a shell script or perl script that can be execute on a host Ubuntu 10.04 (this host has root keys to all the remote hosts), that reads a text file that contain all the remote hostnames that I want to issue a "shutdown" command.

While the script runs, it should output status that says "I'm shutting down hostxxxx"

Some enhancement that I may want is that I want 2 different text files. The script will do a simple shutdown with all the host in one file. Then the script will issue addtional commands of what to to do before the shutdown (such as shutdown mysql) then shutdonw hosts with machines in the 2nd text file.


Project bids (1)

Bids are visible only by project owner and Premium members.