]> git.treefish.org Git - backmeupscotty.git/blobdiff - backmeupscotty
Added SSH connection check.
[backmeupscotty.git] / backmeupscotty
index c7652bbf4fedde63aaf0f9f0fda3a3e86a914b46..9087a17c2a2064fb8a7a031ee783caaed7ed3c52 100644 (file)
@@ -178,6 +178,11 @@ function backmeupscotty {
        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