dole/new-domain
William Brawner 1a34fcba2d Convert new-domain to a shell script
The Python script was swallowing the input and output and causing it to
stall, so instead of learning more Python to make it work, I opted to
hack together a shell script that accomplished the same task.
2021-10-30 00:58:28 +00:00

16 lines
356 B
Bash
Executable file

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