From a39208de998519bf0a6a3c968ae5070a43f954cf Mon Sep 17 00:00:00 2001
From: jwansek <eddie.atten.ea29@gmail.com>
Date: Sun, 18 Aug 2024 22:22:07 +0100
Subject: Fixed a bug in the script

---
 do_backup.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100755 do_backup.sh

(limited to 'do_backup.sh')

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
-- 
cgit v1.2.3