#!/usr/bin/perl -w system("nslookup domain domain"); #if returns on 5th line "Address: xxx.xxx.xxx.110" do nothing - if not send mail system("ping hostname"); # if this returns "alive" then do: my $ssh = Net::SSH::Perl->new("hostname"); $ssh->cmd("3dpipe virtual xx.xxx.xxx.110:443 disabled"); $ssh->cmd("3dpipe virtual xx.xxx.xxx.110:443 disabled"); $ssh->cmd("3dpipe virtual xx.xxx.xxx.110:443 enable"); $ssh->cmd("3dpipe virtual xx.xxx.xxx.110:443 enable"); $ssh->cmd("3dpipe wideip hostname pool pool_sde_primary virtual show all"); $ssh->cmd("3dpipe wideip hostname pool pool_sde_primary virtual show all");