gole/new-domain

16 lines
343 B
Bash
Executable file

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