3132: Fix 3129, thanks to Games-Crack r=mergify[bot] a=nextgens

## What type of PR?

bug-fix

## What does this PR do?

Add required quotes to traefik-certdumper to ensure that shell characters are usable.

### Related issue(s)
- close #3129

## Prerequisites
Before we can consider review and merge, please make sure the following list is done and checked.
If an entry in not applicable, you can check it or remove it from the list.

- [ ] In case of feature or enhancement: documentation updated accordingly
- [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file.


Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
This commit is contained in:
bors-mailu[bot]
2024-01-18 20:30:21 +00:00
committed by GitHub
2 changed files with 5 additions and 4 deletions

View File

@@ -5,14 +5,14 @@ function dump() {
traefik-certs-dumper file --version ${TRAEFIK_VERSION:-v1} --crt-name "cert" --crt-ext ".pem" --key-name "key" --key-ext ".pem" --domain-subdir --dest /tmp/work --source /traefik/acme.json > /dev/null
if [[ -f /tmp/work/${DOMAIN}/cert.pem && -f /tmp/work/${DOMAIN}/key.pem && -f /output/cert.pem && -f /output/key.pem ]] && \
diff -q /tmp/work/${DOMAIN}/cert.pem /output/cert.pem >/dev/null && \
diff -q /tmp/work/${DOMAIN}/key.pem /output/key.pem >/dev/null ; \
if [[ -f "/tmp/work/${DOMAIN}/cert.pem" && -f "/tmp/work/${DOMAIN}/key.pem" && -f /output/cert.pem && -f /output/key.pem ]] && \
diff -q "/tmp/work/${DOMAIN}/cert.pem" /output/cert.pem >/dev/null && \
diff -q "/tmp/work/${DOMAIN}/key.pem" /output/key.pem >/dev/null ; \
then
echo "$(date) Certificate and key still up to date, doing nothing"
else
echo "$(date) Certificate or key differ, updating"
mv /tmp/work/${DOMAIN}/*.pem /output/
mv "/tmp/work/${DOMAIN}"/*.pem /output/
fi
}

View File

@@ -0,0 +1 @@
Add required quotes to traefik-certdumper to ensure that shell characters are usable.