|
@ -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! |