mirror of
https://github.com/Mailu/Mailu.git
synced 2025-04-11 11:32:02 +02:00
Update run.sh
On the first run, this script shows the error 'diff: can't stat '/output/cert.pem': No such file or directory', because the file does not exist in the folder `/output` yet. This bugfix ensures, that the diff is only called, when all required files are available.
This commit is contained in:
parent
cb13689ef5
commit
d6cf5b991b
@ -5,8 +5,10 @@ function dump() {
|
||||
|
||||
traefik-certs-dumper file --crt-name "cert" --crt-ext ".pem" --key-name "key" --key-ext ".pem" --domain-subdir --dest /tmp/work --source /traefik/acme.json > /dev/null
|
||||
|
||||
if 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
|
||||
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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user