Browse Source

Merge branch 'master' of gitlab.altinea.fr:altinea/install-scripts

pull/1/head
Julien Escario 4 years ago
parent
commit
9b9878c41b
  1. 0
      zimbra/ca-root.pem
  2. 27
      zimbra/script-certificat.sh

0
zimbra/ca-root.pem

27
zimbra/script-certificat.sh

@ -1,3 +1,24 @@
blah blah blah
d
Pas génial ce script !
#!/bin/bash
su zimbra /opt/zimbra/bin/zmproxyctl stop
cd /
cd letsencrypt
./letsencrypt-auto certonly --standalone -d zimbrapro.altinea.fr -n
cp /certificat/ca-root.pem /etc/letsencrypt/live/zimbrapro.altinea.fr
cat /etc/letsencrypt/live/zimbrapro.altinea.fr/chain.pem /etc/letsencrypt/live/zimbrapro.altinea.fr/ca-root.pem > /etc/letsencrypt/live/zimbrapro.altinea.fr/chain-root-ca.pem
#echo chain-root-ca.pem
mkdir /opt/zimbra/ssl/letsencrypt
cp /etc/letsencrypt/live/zimbrapro.altinea.fr/* /opt/zimbra/ssl/letsencrypt/
#echo copy OK
rm /opt/zimbra/ssl/letsencrypt/chain.pem
mv /opt/zimbra/ssl/letsencrypt/chain-root-ca.pem /opt/zimbra/ssl/letsencrypt/chain.pem
chown zimbra:zimbra /opt/zimbra/ssl/letsencrypt/*
chown zimbra:zimbra /opt/zimbra/ssl/letsencrypt/
cp -a /opt/zimbra/ssl/zimbra /opt/zimbra/ssl/zimbra.$(date "+%Y%m%d")
cp /opt/zimbra/ssl/letsencrypt/privkey.pem /opt/zimbra/ssl/zimbra/commercial/commercial.key
su - zimbra -c"
cd /opt/zimbra/ssl/letsencrypt/
/opt/zimbra/bin/zmcertmgr deploycrt comm cert.pem chain.pem
#echo ok
#echo redemarrage du zimbra
zmcontrol restart"
#echo fin de la mise à jour du certificat!
Loading…
Cancel
Save