7,166
edits
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
python のバージョン不整合地獄に落ちだが、上の方法が一番近道なので、不整合地獄を力業で解決するのが吉。 | python のバージョン不整合地獄に落ちだが、上の方法が一番近道なので、不整合地獄を力業で解決するのが吉。 | ||
restart はこんな感じでいけるかしら | |||
<syntaxhighlight lang="bash" enclose="div"> | |||
#!/bin/bash | |||
/usr/local/sbin/certbot certonly -d mail.egrep.jp --standalone --manual-public-ip-logging-ok -n --preferred-chain "ISRG Root X1" --agree-tos --register-unsafely-without-email --key-type rsa | |||
if [ $? -ne 0 ] ; then | |||
cp "/etc/letsencrypt/live/mail.egrep.jp/privkey.pem" /opt/zimbra/ssl/zimbra/commercial/commercial.key | |||
chown zimbra:zimbra /opt/zimbra/ssl/zimbra/commercial/commercial.key | |||
wget -O /tmp/ISRG-X1.pem https://letsencrypt.org/certs/isrgrootx1.pem.txt | |||
rm -f "/etc/letsencrypt/live/mail.egrep.jp/chainZimbra.pem" | |||
cp "/etc/letsencrypt/live/mail.egrep.jp/chain.pem" "/etc/letsencrypt/live/mail.egrep.jp/chainZimbra.pem" | |||
cat /tmp/ISRG-X1.pem >> "/etc/letsencrypt/live/mail.egrep.jp/chainZimbra.pem" | |||
chown zimbra:zimbra /etc/letsencrypt -R | |||
cd /tmp | |||
su zimbra -c '/opt/zimbra/bin/zmcertmgr deploycrt comm "/etc/letsencrypt/live/mail.egrep.jp/cert.pem" "/etc/letsencrypt/live/mail.egrep.jp/chainZimbra.pem"' | |||
rm -f "/etc/letsencrypt/live/mail.egrep.jp/chainZimbra.pem" | |||
su -zimbra -c "zmcontrol restart" | |||
fi | |||
</syntaxhighlight> | |||
*オレオレ証明書の更新 | *オレオレ証明書の更新 |