Browse Source

Merge branch 'master' into julien

pull/7/head
Julien Escario 3 years ago
parent
commit
40e82148d2
  1. 20
      zimbra/certificat/ca-root.pem
  2. 27
      zimbra/certificat/renew_cert_acmesh_zimbra.sh
  3. 0
      zimbra/certificat/script-certificat.sh.old

20
zimbra/certificat/ca-root.pem

@ -1,20 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
-----END CERTIFICATE-----

27
zimbra/certificat/renew_cert_acmesh_zimbra.sh

@ -1,8 +1,23 @@
#!/bin/bash
su - zimbra -c "/opt/zimbra/bin/zmproxyctl stop"
/root/.acme.sh/acme.sh --issue --standalone -d dns_host
su - zimbra -c "
/opt/zimbra/bin/zmcertmgr verifycrt comm /opt/zimbra/ssl/zimbra/commercial/commercial.key /etc/myacme/dns_host/dns_host.cer
/opt/zimbra/bin/zmcertmgr deploycrt comm /etc/myacme/dns_host/dns_host.cer /opt/zimbra/ssl/zimbra/commercial/commercial_ca.crt
zmcontrol restart"
#Saisir le FQDN
FQDN_1=zimbrapro.altinea.fr
#FQDN_2=smtp.it-nea.eu
/root/.acme.sh/acme.sh --issue --standalone -d ${FQDN_1}
#/root/.acme.sh/acme.sh --issue --standalone -d ${FQDN_1} -d ${FQDN_2}
su - zimbra -c "/opt/zimbra/bin/zmcertmgr verifycrt comm /opt/zimbra/ssl/zimbra/commercial/commercial.key /etc/myacme/${FQDN_1}/${FQDN_1}.cer"
VERIF_RCODE=$(su - zimbra -c"echo $?")
if [ $VERIF_RCODE -eq 1 ]; then
echo "erreur dans la vérification du certificat"
exit 1;
fi
su - zimbra -c "/opt/zimbra/bin/zmcertmgr deploycrt comm /etc/myacme/${FQDN_1}/${FQDN_1}.cer /opt/zimbra/ssl/zimbra/commercial/commercial_ca.crt"
CERT_RCODE=$(su - zimbra -c"echo $?")
if [ $CERT_RCODE -eq 1 ]; then
echo "erreur dans la mise en place du certificat"
exit 1;
fi
su - zimbra -c "zmcontrol restart"

0
zimbra/certificat/script-certificat.sh → zimbra/certificat/script-certificat.sh.old

Loading…
Cancel
Save