Skip to content

Instantly share code, notes, and snippets.

Created June 28, 2016 16:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
use Rex::Commands::SimpleCheck;
sub wait_for_system_to_come_back {
my ($server) = @_;
# give some time for the reboot
Rex::Logger::info("Waiting for system reboot of $server...");
sleep 30;
while ( !is_port_open $server, 22 ) {
sleep 1;
Rex::Logger::info("System $server is up and running again...");
Rex::Logger::info("Waiting 30 seconds for the services to start up...");
sleep 30;
# reconnect ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment