From 2375406fe0f5b2b9643251f6a460200a8e42381e Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Sun, 27 Mar 2022 20:29:19 +0200 Subject: [PATCH] fixed default RCLONE_REMOTE --- src/init.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/init.sh b/src/init.sh index 594554e..8d568b5 100755 --- a/src/init.sh +++ b/src/init.sh @@ -9,9 +9,11 @@ elif [ ! -e "${RCLONE_CONFIG:=/config/rclone.conf}" ]; then rclone --config "${RCLONE_CONFIG:=/config/rclone.conf}" config fi -RCLONE_REMOTE="$(rclone listremotes | head -1)" -echo "Using remote: $RCLONE_REMOTE" +if [ -z "$RCLONE_REMOTE" ]; then + RCLONE_REMOTE="$(rclone listremotes | head -1)/backup" + echo "\$RCLONE_REMOTE not set. Defaulting to \"$RCLONE_REMOTE\"" +fi RESTIC_REPOSITORY="rclone:$RCLONE_REMOTE"