]> git.treefish.org Git - backmeupscotty.git/commitdiff
Added SSH connection check.
authorAlexander Schmidt <alex@treefish.org>
Mon, 20 Oct 2014 20:40:05 +0000 (22:40 +0200)
committerAlexander Schmidt <alex@treefish.org>
Mon, 20 Oct 2014 20:40:05 +0000 (22:40 +0200)
backmeupscotty

index c7652bbf4fedde63aaf0f9f0fda3a3e86a914b46..9087a17c2a2064fb8a7a031ee783caaed7ed3c52 100644 (file)
@@ -178,6 +178,11 @@ function backmeupscotty {
        esac
     done
 
        esac
     done
 
+    if (! ssh -q $REMOTE_HOST exit); then
+       scottyerror "Could not establish SSH connection to $REMOTE_HOST!"
+       exit 1
+    fi
+
     if isNthDay; then
        scottyinfo "This is the nth day."
     elif latestTooOld; then
     if isNthDay; then
        scottyinfo "This is the nth day."
     elif latestTooOld; then