[CentOS] Testing remote machine status in a script ?

Sun Oct 25 11:22:56 UTC 2009
Niki Kovacs <contact at kikinovak.net>

Hi,

I'd like to test the status of a remote machine in a script. Something like:

IF remote machine is switched on / connected to the network...

... THEN launch backup.

How would you go about that?

Cheers,

Niki