diff --git a/home/.chezmoiscripts/universal/run_onchange_after_50-rclone.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_50-rclone.sh.tmpl index 96e9b105..d2e23f47 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_50-rclone.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_50-rclone.sh.tmpl @@ -50,7 +50,7 @@ {{ includeTemplate "universal/logg" }} if command -v rclone > /dev/null; then - {{- if and (or (and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_ID"))) (env "CLOUDFLARE_R2_ID")) (or (and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_SECRET"))) (env "CLOUDFLARE_R2_SECRET")) (ne .user.cloudflare.r2 "") -}} + {{- if and (or (and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_ID"))) (env "CLOUDFLARE_R2_ID")) (or (and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "CLOUDFLARE_R2_SECRET"))) (env "CLOUDFLARE_R2_SECRET")) (ne .user.cloudflare.r2 "") }} logg info 'Removing ~/.config/rclone/rclone.conf INSTALL DOCTOR managed block' CONFIG_FILE="$HOME/.config/rclone/rclone.conf" if cat "$CONFIG_FILE" | grep '# INSTALL DOCTOR MANAGED S3'; then @@ -76,7 +76,7 @@ secret_access_key = {{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" type = s3 # INSTALL DOCTOR MANAGED S3 EOT - {{- end -}} + {{- end }} logg info 'Ensuring /var/cache/rclone exists' sudo mkdir -p /var/cache/rclone