dehydrated_cron.sh: Read dehydrated configuration variables.

This commit is contained in:
Christoph 2021-07-14 23:31:50 +02:00
parent 5d9aa2dce7
commit a18e78957d

View File

@ -1693,6 +1693,29 @@ fi
# --- Prepare dehydrated # --- Prepare dehydrated
# --- # ---
# - Read dehydrated configuration variables.."
# -
\$verbose && echononl " Read dehydrated configuration variables .."
eval "\$(/usr/local/dehydrated/dehydrated --env)"
ret_val=\$?
if [[ \$ret_val -eq 0 ]]; then
\$verbose && echo_ok
else
\$verbose && echo_failed
if \$verbose ; then
error "Reading dehydrated configuration variables failed!"
else
echo -e "\\n [ Error ]: Reading dehydrated configuration variables failed! \\n"
fi
echo ""
echo "Error message from dehydrated script:"
echo "====================================="
echo ""
cat \$_logfile
echo ""
exit 10
fi
# - Add maill server name and, if present, concerning alternative names # - Add maill server name and, if present, concerning alternative names
# - to domains.txt # - to domains.txt
# - # -
@ -1795,6 +1818,28 @@ else
fi fi
#_logfile_ECC="/tmp/dehydrated-ECC.log"
#\$verbose && echononl " Generate ECC flavor of cert .."
#\$dehydrated_script -c -g --algo prime256v1 --out \${CERTDIR}/ECC > \$_logfile_ECC 2>&1
#ret_val=\$?
#if [[ \$ret_val -eq 0 ]]; then
# \$verbose && echo_ok
#else
# \$verbose && echo_failed
# if \$verbose ; then
# error "Dehydrated Script returns with error (\$ret_val)!"
# else
# echo -e "\\n [ Error ]: Dehydrated Script returns with error (\$ret_val)! \\n"
# fi
# echo ""
# echo "Error message from dehydrated script:"
# echo "====================================="
# echo ""
# cat \$_logfile_ECC
# echo ""
# exit 10
#fi
# --- # ---
# --- Postgeneration Tasks # --- Postgeneration Tasks
# --- # ---