Ping a host, issue a command if it is up or down