1. Letsencrypt/certbot/FreeBSD/deply-hook

hooks: --pre-hook and --post-hook hooks run before and after every renewal attempt

If you want your hook to run only after a successful renewal, use --deploy-hook in a command like this.

certbot renew --deploy-hook /path/to/deploy-hook-script

2. env

certbot --help renew より

  --deploy-hook DEPLOY_HOOK
   Command to be run in a shell once for each successfully issued certificate.
  For this command, the shell variable $RENEWED_LINEAGE will point to 
  the config live subdirectory (for example, "/etc/letsencrypt/live/example.com")
   containing the new certificates and keys;
   the shell variable $RENEWED_DOMAINS will contain a space-delimited list
   of renewed certificate domains (for example, "example.com www.example.com" (default: None)