#!/bin/sh set -e for FILE in /etc/dehydrated/config /etc/dehydrated/conf.d/*.sh do if [ -e "${FILE}" ] then . ${FILE} || true fi done . /usr/share/debconf/confmodule if [ -n "${CA}" ] then db_set open-infrastructure-dehydrated-tools/ca "${CA}" fi db_settitle open-infrastructure-dehydrated-tools/title db_input low open-infrastructure-dehydrated-tools/ca || true db_go if [ -n "${CHALLENGETYPE}" ] then db_set open-infrastructure-dehydrated-tools/challengetype "${CHALLENGETYPE}" fi db_settitle open-infrastructure-dehydrated-tools/title db_input low open-infrastructure-dehydrated-tools/challengetype || true db_go if [ -n "${CONTACT_EMAIL}" ] then db_set open-infrastructure-dehydrated-tools/contact-email "${CONTACT_EMAIL}" fi db_settitle open-infrastructure-dehydrated-tools/title db_input low open-infrastructure-dehydrated-tools/contact-email || true db_go if [ -e /usr/share/dehydrated/hooks ] then HOOKS_CHOICES="$(cd /usr/share/dehydrated/hooks && find -maxdepth 1 -not -type d -printf '%P\n' | sort)" db_subst open-infrastructure-dehydrated-tools/hooks HOOKS_CHOICES "ALL, $(echo ${HOOKS_CHOICES} | sed -e 's| |, |g')" db_settitle open-infrastructure-dehydrated-tools/title db_input low open-infrastructure-dehydrated-tools/hooks || true db_go fi db_settitle open-infrastructure-dehydrated-tools/title db_input low open-infrastructure-dehydrated-tools/basedir || true db_go if ! ls /var/lib/dehydrated/accounts/*/account_key.pem > /dev/null 2>&1 then db_settitle open-infrastructure-dehydrated-tools/title db_input low open-infrastructure-dehydrated-tools/register || true db_go fi db_stop