Home · Latest · Trends  /  general
1

reboot chain

rated 1 times [  1] [ 0]  / comments: 2 / hits: 1033  / 2 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
An application which is going to design by some of the different ways as well as it also may concern with the better part of the output. The better at different things of resumeprime reviews may involve by the time to make a better part of the output as well as make the application work more efficient by the time.
[#8] Wednesday, March 13, 2019, 19:07:39
 
angelinalysaght
commented 6 days ago
0
I clearly stumbled upon your weblog and favored to mention that I’ve truly loved reading your blog posts. anyhow I’ll be subscribing in your feed do my assignment for me and that i wish you submit once more quickly. Please keeps it top posting! thanks you a lot, I recognize your work.
[#10] Thursday, March 14, 2019, 06:42:54
 
ms199730
commented 5 days 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: 123
Total Comments: 1
Location: n/a
Following
User not following anyone yet.
rob snippets
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017