From 15541a5fb67fed411d749259cabd21b7b44b8356 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Sun, 27 Mar 2022 20:27:10 +0200 Subject: [PATCH] fixed rclone config content --- src/init.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/init.sh b/src/init.sh index 0ffab31..594554e 100755 --- a/src/init.sh +++ b/src/init.sh @@ -2,8 +2,9 @@ set -e -# if RCLONE_CONFIG_CONTENT is empty and no config file was found -if [ -z "$RCLONE_CONFIG_CONTENT" ] && [ ! -e "${RCLONE_CONFIG:=/config/rclone.conf}" ]; then +if [ -n "$RCLONE_CONFIG_CONTENT" ]; then + echo "$RCLONE_CONFIG_CONTENT" > "${RCLONE_CONFIG:=/config/rclone.conf}" +elif [ ! -e "${RCLONE_CONFIG:=/config/rclone.conf}" ]; then echo "No rclone config found" rclone --config "${RCLONE_CONFIG:=/config/rclone.conf}" config fi