From fa646747618983d91cf731dca40ac69e7c00def6 Mon Sep 17 00:00:00 2001 From: Markus Keil Date: Tue, 27 Feb 2024 17:44:17 +0100 Subject: [PATCH] allow custom template --- mirror-s3.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mirror-s3.sh b/mirror-s3.sh index 75f6cbf..29d437b 100644 --- a/mirror-s3.sh +++ b/mirror-s3.sh @@ -1,6 +1,11 @@ #!/bin/sh echo "Generating rclone config..." -envsubst < /etc/rclone.conf.tmpl > /etc/rclone.conf +TMPL="/etc/rclone.conf.tmp" +if [ -n "$RCLONE_TMPL" ]; then + echo "== USING CUSTOM TEMPLATE ==" + TMPL="$RCLONE_TMPL" +fi +envsubst < $TMPL > /etc/rclone.conf echo "Running rclone sync..." DEBUG=""