Skip to content
Snippets Groups Projects
Commit 310a56df authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

Bugfix: copy key from csr folder to ~/.acme/

parent 34b28637
No related branches found
No related tags found
1 merge request!2Bugfix: copy key from csr folder to ~/.acme/
......@@ -27,6 +27,7 @@
# 2022-01-10 <axel.hahn@iml.unibe.ch> _wait_for_free_slot: exclude ssh calls
# 2022-03-30 <axel.hahn@iml.unibe.ch> remove usage of csr and generation of key file
# 2022-03-31 <axel.hahn@iml.unibe.ch> dns authentication with alias domain
# 2022-04-04 <axel.hahn@iml.unibe.ch> Bugfix: copy key from csr folder to ~/.acme/
# ======================================================================
......@@ -516,6 +517,20 @@ function public_renew(){
_wait_for_free_slot
_requiresFqdn
_certMustExist
# BUGFIX: acme.sh does not create a new key file on renew.
# After switching from csr method to pram -d we got a 0 byte Keyfile
local _acme_keyfile="~/.acme/${CM_fqdn}/${CM_fqdn}.key"
if test ! -f "$_acme_keyfile"
then
echo "FIX: copy key from csr folder $CM_filekey to $_acme_keyfile"
if ! cp "$CM_filekey" "$_acme_keyfile"
then
exit 1
fi
fi
# /BUGFIX
$ACME --renew -d ${CM_fqdn} $ACME_Params
local _rc=$?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment