security certificate – CERTBOT_DOMAIN not set in hook

I am currently trying to set up a hook for certificate deployment. I have successfully retrieved the certificate and found out that you have to force renewal when testing, so I’ve now hit the rate limit (grumble grumble). So far I haven’t been able to figure out why CERTBOT_DOMAIN appears not to be set when the hook is called.

Renewal was a success and Certbot prints out that it is running the hook: Running post-hook command: /etc/letsencrypt/renewal-hooks/post/cert-upload.sh

Here is the script:

#!/bin/bash
echo "DOMAIN IS $CERTBOT_DOMAIN"

It prints out DOMAIN IS

The docs seem to indicate this is the right variable name; what am I missing here?