Verified Commit 88875505 authored by Dmytro Bogatov's avatar Dmytro Bogatov 💕

Add new domains.

parent 24a25309
......@@ -12,4 +12,4 @@ source ./.secret.sh
curl -s -X PUT -d "$CERTBOT_VALIDATION" --user $EMAIL:$PASSWORD https://box.dbogatov.org/admin/dns/custom/_acme-challenge.$CERTBOT_DOMAIN/TXT
sleep 2
sleep 5
......@@ -2,10 +2,16 @@
declare -A DOMAINS
DOMAINS["dbogatov.org"]=true
DOMAINS["cluster.dbogatov.org"]=true
DOMAINS["pages.dbogatov.org"]=true
MAIN=("dbogatov.org" "dmytro.app" "bogatov.app")
# boolean value indicates if non-wildcard cert should be requested
DOMAINS["__MAIN__"]=true
DOMAINS["cluster.__MAIN__"]=false
DOMAINS["pages.__MAIN__"]=false
DOMAINS["netwatch.app"]=true
DOMAINS["orlova.app"]=true
DOMAINS["bogatov.kiev.ua"]=true
DOMAINS["visasupport.com.ua"]=true
DOMAINS["visasupport.kiev.ua"]=true
......@@ -27,7 +33,26 @@ get-domains () {
for domain in "${!DOMAINS[@]}"
do
OUTPUT+="$domain,*.$domain,"
if [[ $domain = *"__MAIN__"* ]]
then
for main in ${MAIN[@]}
do
newdomain=${domain/__MAIN__/$main}
if [ ${DOMAINS[${domain}]} == true ]
then
OUTPUT+="$newdomain,*.$newdomain,"
else
OUTPUT+="*.$newdomain,"
fi
done
else
if [ ${DOMAINS[${domain}]} == true ]
then
OUTPUT+="$domain,*.$domain,"
else
OUTPUT+="*.$domain,"
fi
fi
done
echo ${OUTPUT%?}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment