From d908f7caed75b23ad8ebe7a885dff53a191f23f8 Mon Sep 17 00:00:00 2001 From: Ray Tanaka Date: Wed, 31 Oct 2018 00:00:05 -0700 Subject: [PATCH] addig rclone verification step --- run/rclone_archive/verify-archive-configuration.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/run/rclone_archive/verify-archive-configuration.sh b/run/rclone_archive/verify-archive-configuration.sh index 95dbbf8..7b89e75 100644 --- a/run/rclone_archive/verify-archive-configuration.sh +++ b/run/rclone_archive/verify-archive-configuration.sh @@ -1 +1,12 @@ -#!/bin/bash -eu \ No newline at end of file +#!/bin/bash -eu + +function verify_configuration () { + echo "Verifying rlcone configuration..." + if ! rclone lsd "$RCLONE_DRIVE": | grep -q "$RCLONE_PATH" + then + echo "STOP: Could not find the $RCLONE_DRIVE:$RCLONE_PATH" + exit 1 + fi +} + +verify_configuration \ No newline at end of file