acme-sh: fix the unattended scripts. They failed to fix the permissions, so the certificate renewal would fail.

This commit is contained in:
Andrea Dell'Amico 2018-09-12 16:59:48 +02:00
parent e6d4dcfe93
commit 44ac051834
2 changed files with 4 additions and 1 deletions

View File

@ -12,10 +12,12 @@ else
exit 1
fi
su - acme -s /bin/bash -c '/usr/local/bin/acme-sh-cron-command'
chown -R acme:acme "$ACME_SH_HOME"
sudo -u acme -s /bin/bash /usr/local/bin/acme-sh-cron-command
if [ "$ACME_SH_INSTALL_CERTS" == "True" ] ; then
$ACME_SH_BIN $ACME_SH_INSTALL_CERT_REQUEST > "$ACME_SH_INSTALL_LOG_FILE" 2>&1
chown -R acme:acme "$ACME_SH_HOME"
fi
exit $?

View File

@ -18,5 +18,6 @@ if [ -d "$ACME_SH_HOME/keys/fakeselfsignedcert" -a -d "$ACME_SH_HOME/certs/fakes
fi
$ACME_SH_BIN $ACME_SH_INSTALL_CERT_REQUEST > "$ACME_SH_INSTALL_LOG_FILE" 2>&1
chown -R acme:acme "$ACME_SH_HOME"
exit $?