You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.9 KiB

  1. su zimbra /opt/zimbra/bin/zmproxyctl stop
  2. /root/.acme.sh/acme.sh --issue --standalone -d replace_host
  3. cd /etc/myacme/replace_host/
  4. mkdir /opt/zimbra/ssl/letsencrypt
  5. echo '-----BEGIN CERTIFICATE-----
  6. MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
  7. MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
  8. DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
  9. PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
  10. Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
  11. AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
  12. rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
  13. OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
  14. xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
  15. 7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
  16. aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
  17. HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
  18. SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
  19. ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
  20. AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
  21. R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
  22. JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
  23. Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
  24. -----END CERTIFICATE-----' >> fullchain.cer
  25. cp /etc/myacme/replace_host/* /opt/zimbra/ssl/letsencrypt/
  26. chown zimbra:zimbra /opt/zimbra/ssl/letsencrypt/*
  27. chown zimbra:zimbra /opt/zimbra/ssl/letsencrypt/
  28. cp -a /opt/zimbra/ssl/zimbra /opt/zimbra/ssl/zimbra.$(date "+%Y%m%d")
  29. cp /opt/zimbra/ssl/letsencrypt/replace_host.key /opt/zimbra/ssl/zimbra/commercial/commercial.key
  30. su - zimbra -c "
  31. cd /opt/zimbra/ssl/letsencrypt/
  32. /opt/zimbra/bin/zmcertmgr verifycrt comm replace_host.key replace_host.cer fullchain.cer
  33. /opt/zimbra/bin/zmcertmgr deploycrt comm replace_host.cer fullchain.cer
  34. zmcontrol restart"