Bonjour à tous,

        J'utiliser cerbot depuis pas mal de temps et je viens de m'apercevoir
qu'un script deploy n'est pas appelé.

        Ma configuration permet de générer automatiquement un certificat
*.systella.fr (j'ai mon propre dns autoritaire, ça fait des années que
ça fonctionne comme ça).

        J'ai en revanche dû créer un certificat pour auth.jitsi.systella.fr.
Certificat qui est aussi créé automatiquement et mis à jour.

        Pour que tout ce beau monde fonctionne, j'ai créé trois scripts dans
/etc/letsencrypt/renewal-hooks/deploy.

Root rayleigh:[/etc/letsencrypt/renewal-hooks/deploy] > cat 20-apache2
#!/bin/sh

# It's important to not use Bash because it is not available in the
# Docker container that runs certbot.

# Exit immediately if a command exits with non-zero status
set -e

case $RENEWED_DOMAINS in
  *systella.fr*)
    /etc/init.d/apache2 reload
    ;;
esac

Root rayleigh:[/etc/letsencrypt/renewal-hooks/deploy] > cat 30-jitsi
#!/bin/sh

# It's important to not use Bash because it is not available in the
# Docker container that runs certbot.

# Exit immediately if a command exits with non-zero status
set -e

case $RENEWED_DOMAINS in
  *systella.fr*)

    # We don't care about file permissions because we know that the
    # filesystem folder where we generate the file is not generally
    # accessible
        /usr/bin/prosodyctl -root cert import jitsi.systella.fr
/etc/letsencrypt/live/systella.fr
        /usr/bin/prosodyctl -root cert import auth.jitsi.systella.fr
/etc/letsencrypt/live/auth.jitsi.systella.fr
        /etc/init.d/prosody restart
    ;;
esac

        Ces deux scripts fonctionnent et sont appelés dès que le certificat
*.systella.fr est renouvelé. Ils sont peut-être aussi appelés lors du
renouvellement de auth.jitsi.systella.fr.

        Le problème est le troisième script :

Root rayleigh:[/etc/letsencrypt/renewal-hooks/deploy] > cat 10-courier
#!/bin/sh

# It's important to not use Bash because it is not available in the
# Docker container that runs certbot.

# Exit immediately if a command exits with non-zero status
set -e

case $RENEWED_DOMAINS in
  systella.fr*)

    # We don't care about file permissions because we know that the
    # filesystem folder where we generate the file is not generally
    # accessible
    cat "$RENEWED_LINEAGE/fullchain.pem" "$RENEWED_LINEAGE/privkey.pem" > \
        "$RENEWED_LINEAGE/courier.cert-and-key.unsecure"
    \cp -f "$RENEWED_LINEAGE/courier.cert-and-key.unsecure" \
        /etc/courier/letsencrypt.pem
    /etc/init.d/courier-imap-ssl restart
    #/etc/init.d/courier-pop-ssl restart
    /etc/init.d/sendmail restart
    ;;
esac

        Je me suis aperçu qu'il n'était pas appelé lors du renouvellement du
certificat *.systella.fr

        D'où ma question parce que je n'ai rien trouvé dans la documentation de
certbot.

        Que contient $RENEWED_DOMAINS dans le cas de *.systella.fr et de
auth.jitsi.systella.fr ?

        Bien cordialement,

        JB

Attachment: signature.asc
Description: OpenPGP digital signature

Répondre à