blob: 571e491a373b1223c12ebb805ce361d78fcc3590 (
plain) (
tree)
|
|
#!/bin/sh
#apikey=SECRET
#secretapikey=SECRET
uri=https://porkbun.com/api/json/v3/ssl/retrieve/
get_cert() {
domain=$1
curl "$uri/$domain" --silent --data "{ \"apikey\": \"$apikey\", \"secretapikey\": \"$secretapikey\" }"
}
extract_keys() {
jq --raw-output .publickey,.privatekey
}
for domain in 53hor.net theglassyladies.com
do
get_cert $domain | extract_keys > $domain.pem
done
|