2021-10-30 00:58:28 +00:00
|
|
|
#!/usr/bin/env sh
|
2021-10-30 00:05:59 +00:00
|
|
|
|
2021-11-24 20:46:37 +00:00
|
|
|
KEY_FILE="/root/google-cloud-key.json"
|
2021-10-30 00:05:59 +00:00
|
|
|
|
2021-11-24 20:46:37 +00:00
|
|
|
if [ ! -f $KEY_FILE ]; then
|
|
|
|
echo "ERROR: google cloud credentials not present at $KEY_FILE"
|
2021-10-30 00:58:28 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2021-10-30 00:05:59 +00:00
|
|
|
|
2021-11-24 20:46:37 +00:00
|
|
|
CMD="certbot certonly --dns-google --dns-google-credentials $KEY_FILE --dns-google-propagation-seconds 90"
|
2021-10-30 00:05:59 +00:00
|
|
|
|
2021-10-30 00:58:28 +00:00
|
|
|
for domain in "$@"; do
|
|
|
|
CMD="$CMD -d $domain"
|
|
|
|
done
|
2021-10-30 00:05:59 +00:00
|
|
|
|
2021-10-30 00:58:28 +00:00
|
|
|
eval $CMD
|