Add a postupdate hook to certbot-auto

#1

how about something like this in certbot-auto ?

(...)
    say "Installation succeeded."
  fi

  if [ -x "$POSTUPDATE_HOOK" ]; then
    say "run postupdate hook."
    "$POSTUPDATE_HOOK" "$VENV_PATH"
  fi

  if [ "$INSTALL_ONLY" = 1 ]; then
    say "Certbot is installed."
    exit 0
  fi

  "$VENV_BIN/letsencrypt" "$@"

then start certbot-auto like this:
POSTUPDATE_HOOK=/etc/letsencrypt/postupdate ./certbot-auto

and in postupdate file something like this
$1/bin/pip install certbot-dns-linode

I tested it under python2 and python3 by deleting the venv (sudo rm /opt/eff.org) and restarting and the plugin was here after restarting certbot-auto.
That’s not efficient yes, but it could get a result in some cases where the desired dns interface is not yet available for system packages.

1 Like
#2

This would have been pretty useful (historically and today) to install plugins for certbot-auto, definitely.

But I think the team is currently working on a new packaging system for Certbot and its plugins. So I’m not sure whether it’d be accepted.

1 Like
#3

Hope springs eternal in the breast of all Python fans waiting for packaging problems to be fixed, such as this pip bug. I’m pretty sure that once this is done, the certbot-auto plugin packaging will be a breeze to solve.

#4

Thanks for sharing your idea!

Certbot is open source and while many of their developers respond on the community forums, Certbot feature requests and issue tracking is best done through the Github repository. I suggest searching the currently opened issues to see if your idea exists and creating an issue if it doesn’t. You can also create a pull request and see if it gets accepted.

2 Likes