aboutsummaryrefslogtreecommitdiffstats
path: root/do_backup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'do_backup.sh')
-rwxr-xr-xdo_backup.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/do_backup.sh b/do_backup.sh
new file mode 100755
index 0000000..35aefc9
--- /dev/null
+++ b/do_backup.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+ssh -q -o BatchMode=yes -o StrictHostKeyChecking=no -o ConnectTimeout=5 $1 'exit 0'
+if [ $? == 0 ];then
+ echo "Online check succeeded."
+else
+ echo "Backup target is offline."
+fi