install_dehydrated.sh: support multiple dehydrated installations.

This commit is contained in:
Christoph 2024-09-28 22:29:39 +02:00
parent c1dc3e931c
commit 287e41aa00

View File

@ -1476,11 +1476,11 @@ cat << EOF > $DH_CRON_SCRIPT
#!/usr/bin/env bash
## ------------------------------------------------------------------------------
## --- All Configurations will be done in /etc/dehydrated/dehydrated_cronjob.conf
## --- All Configurations will be done in ${DH_CONF_DIR}/dehydrated_cron.conf
## ------------------------------------------------------------------------------
if [[ -f "/etc/dehydrated/dehydrated_cron.conf" ]]; then
source /etc/dehydrated/dehydrated_cron.conf
if [[ -f "${DH_CONF_DIR}/dehydrated_cron.conf" ]]; then
source ${DH_CONF_DIR}/dehydrated_cron.conf
else
echo
echo -e " [ Error ]: No Configuration File found. Exiting now!"
@ -1793,7 +1793,7 @@ fi
# - needed.
# -
\$verbose && echononl " Register account and agree to their terms of service .."
\$dehydrated_script --register --accept-terms > \$_logfile 2>&1
\$dehydrated_script --config ${DH_CONF_DIR}/config --register --accept-terms > \$_logfile 2>&1
ret_val=\$?
if [[ \$ret_val -eq 0 ]]; then
\$verbose && echo_ok
@ -1813,7 +1813,7 @@ else
exit 10
fi
\$verbose && echononl " Invoking the main dehydrated script for certificate generation.."
\$dehydrated_script -c -g > \$_logfile 2>&1
\$dehydrated_script --config ${DH_CONF_DIR}/config -c -g > \$_logfile 2>&1
ret_val=\$?
if [[ \$ret_val -eq 0 ]]; then
_successfully_finished_script=true