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"