diff options
Diffstat (limited to 'debian/open-infrastructure-dehydrated-tools.postinst')
-rwxr-xr-x | debian/open-infrastructure-dehydrated-tools.postinst | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/debian/open-infrastructure-dehydrated-tools.postinst b/debian/open-infrastructure-dehydrated-tools.postinst index bd3ca57..1b0f776 100755 --- a/debian/open-infrastructure-dehydrated-tools.postinst +++ b/debian/open-infrastructure-dehydrated-tools.postinst @@ -235,9 +235,18 @@ EOF mkdir -p "${BASEDIR}/acme-challenges" fi - if [ -n "${DOMAINS}" ] + if [ -n "${DOMAINS}" ] && [ "${DOMAINS}" != "none" ] then - echo "${DOMAINS}" > /etc/dehydrated/domains.txt + rm -f /etc/dehydrated/domains.txt + + GROUPS="$(echo ${DOMAINS} | sed -e 's/ /#/g' -e 's/|/ /g')" + + for GROUP in ${GROUPS} + do + DOMAINS="$(echo ${GROUP} | sed -e 's/#/ /g' -e 's/^ //g')" + + echo "${DOMAINS}" >> /etc/dehydrated/domains.txt + done fi if [ -n "${TSIG}" ] |