Support TLD wildcard along with nested subdomain wildcards
This commit is contained in:
parent
8d5430dada
commit
240fb03b9e
@ -169,27 +169,20 @@ fi
|
|||||||
# figuring out url only vs url & subdomains vs subdomains only
|
# figuring out url only vs url & subdomains vs subdomains only
|
||||||
if [ -n "$SUBDOMAINS" ]; then
|
if [ -n "$SUBDOMAINS" ]; then
|
||||||
echo "SUBDOMAINS entered, processing"
|
echo "SUBDOMAINS entered, processing"
|
||||||
if [ "$SUBDOMAINS" = "wildcard" ]; then
|
for job in $(echo "$SUBDOMAINS" | tr "," " "); do
|
||||||
if [ "$ONLY_SUBDOMAINS" = true ]; then
|
if [ "$job" = "wildcard" ]; then
|
||||||
export URL_REAL="-d *.${URL}"
|
export SUBDOMAINS_REAL="$SUBDOMAINS_REAL -d *.${URL}"
|
||||||
echo "Wildcard cert for only the subdomains of $URL will be requested"
|
|
||||||
else
|
else
|
||||||
export URL_REAL="-d *.${URL} -d ${URL}"
|
|
||||||
echo "Wildcard cert for $URL will be requested"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "SUBDOMAINS entered, processing"
|
|
||||||
for job in $(echo "$SUBDOMAINS" | tr "," " "); do
|
|
||||||
export SUBDOMAINS_REAL="$SUBDOMAINS_REAL -d ${job}.${URL}"
|
export SUBDOMAINS_REAL="$SUBDOMAINS_REAL -d ${job}.${URL}"
|
||||||
done
|
|
||||||
if [ "$ONLY_SUBDOMAINS" = true ]; then
|
|
||||||
URL_REAL="$SUBDOMAINS_REAL"
|
|
||||||
echo "Only subdomains, no URL in cert"
|
|
||||||
else
|
|
||||||
URL_REAL="-d ${URL}${SUBDOMAINS_REAL}"
|
|
||||||
fi
|
fi
|
||||||
echo "Sub-domains processed are: $SUBDOMAINS_REAL"
|
done
|
||||||
|
if [ "$ONLY_SUBDOMAINS" = true ]; then
|
||||||
|
URL_REAL="$SUBDOMAINS_REAL"
|
||||||
|
echo "Only subdomains, no URL in cert"
|
||||||
|
else
|
||||||
|
URL_REAL="-d ${URL}${SUBDOMAINS_REAL}"
|
||||||
fi
|
fi
|
||||||
|
echo "Sub-domains processed are: $SUBDOMAINS_REAL"
|
||||||
else
|
else
|
||||||
echo "No subdomains defined"
|
echo "No subdomains defined"
|
||||||
URL_REAL="-d $URL"
|
URL_REAL="-d $URL"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user