Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run package installer as part of SWAG init to prevent init fail due to missing dns plugin #460

Merged
merged 5 commits into from
Mar 5, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/init-certbot-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ for i in "${SANED_VARS[@]}"; do
export echo "${i}"="$(echo "${!i}" | tr '[:upper:]' '[:lower:]')"
done

# Check for and install requested DNS plugins
if grep -q "universal-package-install" <<< "${DOCKER_MODS}" && grep -q "certbot-dns" <<< "${INSTALL_PIP_PACKAGES}"; then
echo "**** Installing requested dns plugins ****"
/etc/s6-overlay/s6-rc.d/init-mod-universal-package-install-add-package/run
/etc/s6-overlay/s6-rc.d/init-mods-package-install/run
aptalca marked this conversation as resolved.
Show resolved Hide resolved
fi

# check to make sure DNSPLUGIN is selected if dns validation is used
CERTBOT_DNS_AUTHENTICATORS=$(certbot plugins --authenticators 2>/dev/null | sed -e 's/^Entry point: EntryPoint(name='\''cpanel'\''/Entry point: EntryPoint(name='\''dns-cpanel'\''/' -e '/EntryPoint(name='\''dns-/!d' -e 's/^Entry point: EntryPoint(name='\''dns-\([^ ]*\)'\'',/\1/' | sort)
if [[ "${VALIDATION}" = "dns" ]] && ! echo "${CERTBOT_DNS_AUTHENTICATORS}" | grep -q "${DNSPLUGIN}"; then
Expand Down