Add a postupdate hook to certbot-auto

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

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.

2 Likes

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.

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.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.