Home · Latest · Trends  /  general
1

reboot chain

rated 1 times [  1] [ 0]  / comments: 10 / hits: 1377  / 3 yaers ago, wed, feb 22, 2017, 14:57:58
Reboot a group of servers one at a time as each one comes up. Replace the xxx.xxx.xxx.xxx with hostnames or IPs.
!/bin/bash

# Will reboot all servers in array, but one at a time as each comes up...

servers=(
xxx.xxx.xxx.xxx
xxx.xxx.xxx.xxx
)

for server in ${servers[@]}
do
ssh $server sudo shutdown -r now
sleep 120
while ! ping -c1 $server &>/dev/null; do :; done
wait
echo $server complete
date
done
More From » general
 

Comments

0
It is very interesting to see the need and power in leaving comments on other sites. download ml
[#75] Wednesday, June 19, 2019, 10:05:02
 
luciham20
commented 3 months ago
0
Cool stuff… thanks for the post. Saved this site! towing Mt Vernon
[#84] Wednesday, June 19, 2019, 23:32:05
 
joshuaprice153
commented 3 months ago
0
Awesome! What a great help. Thanks. Ohio Green Releaf
[#116] Monday, June 24, 2019, 06:48:44
 
elijahperterson7924
commented 3 months ago
0
The field of web designing and web programming seems to be very popular among the youth these days therefore the best essay services is also promoting these fields. The PHP language helps a lot when it comes to the web and networking because it is specially designed software for such things.
[#152] Thursday, July 18, 2019, 17:35:46
 
angelinalysaght
commented 2 months ago
0
Here we go! I’m new at programming, because it was my hobby recently, but one day I decided I’d like to change career, so started learning coding. Even took some courses, because I’m bad at learning. I always ordered my essays from essay mama when I was at school, even though we had workshops for creative writing, but it never worked for me. But such notes make my learning process easier!
[#204] Monday, August 26, 2019, 12:18:58
 
mathew salinas
commented 3 weeks ago
Only authorized users can post. Please sign in first, or register a free account
 
Share
Sponsor
Posted
rob

rob

Member since Feb 22, 2017
Total Code Snippets: 127
Total Comments: 1
Location: n/a
Following
User not following anyone yet.
rob snippets
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017
3 yaers ago, wed, feb 22, 2017