dole/new-domain

17 lines
356 B
Text
Raw Permalink Normal View History

#!/usr/bin/env sh
2021-10-30 00:05:59 +00:00
INI_FILE="/root/digitalocean.ini"
2021-10-30 00:05:59 +00:00
if [ ! -f $INI_FILE ]; then
echo "ERROR: digitalocean credentials not present at $INI_FILE"
exit 1
fi
2021-10-30 00:05:59 +00:00
CMD="certbot certonly --dns-digitalocean --dns-digitalocean-credentials $INI_FILE --dns-digitalocean-propagation-seconds 90"
2021-10-30 00:05:59 +00:00
for domain in "$@"; do
CMD="$CMD -d $domain"
done
2021-10-30 00:05:59 +00:00
eval $CMD