If pem certs are not available
This commit is contained in:
parent
1d4959ccaa
commit
c0009d1be9
|
@ -327,7 +327,11 @@ function xmpp_create_config {
|
|||
echo 'https_ports = { 5281 }' >> /etc/prosody/prosody.cfg.lua
|
||||
echo 'https_interfaces = { "*" }' >> /etc/prosody/prosody.cfg.lua
|
||||
echo 'https_ssl = {' >> /etc/prosody/prosody.cfg.lua
|
||||
echo " certificate = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.pem\";" >> /etc/prosody/prosody.cfg.lua
|
||||
if [ -f /etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.pem ]; then
|
||||
echo " certificate = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.pem\";" >> /etc/prosody/prosody.cfg.lua
|
||||
else
|
||||
echo " certificate = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.crt\";" >> /etc/prosody/prosody.cfg.lua
|
||||
fi
|
||||
echo " key = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.key\";" >> /etc/prosody/prosody.cfg.lua
|
||||
echo " curve = $XMPP_ECC_CURVE;" >> /etc/prosody/prosody.cfg.lua
|
||||
echo " ciphers = $XMPP_CIPHERS;" >> /etc/prosody/prosody.cfg.lua
|
||||
|
@ -337,7 +341,11 @@ function xmpp_create_config {
|
|||
echo '' >> /etc/prosody/prosody.cfg.lua
|
||||
echo 'ssl = {' >> /etc/prosody/prosody.cfg.lua
|
||||
echo " key = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.key\";" >> /etc/prosody/prosody.cfg.lua
|
||||
echo " certificate = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.pem\";" >> /etc/prosody/prosody.cfg.lua
|
||||
if [ -f /etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.pem ]; then
|
||||
echo " certificate = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.pem\";" >> /etc/prosody/prosody.cfg.lua
|
||||
else
|
||||
echo " certificate = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.crt\";" >> /etc/prosody/prosody.cfg.lua
|
||||
fi
|
||||
echo " curve = $XMPP_ECC_CURVE;" >> /etc/prosody/prosody.cfg.lua
|
||||
echo ' depth = "1";' >> /etc/prosody/prosody.cfg.lua
|
||||
echo " ciphers = $XMPP_CIPHERS;" >> /etc/prosody/prosody.cfg.lua
|
||||
|
@ -361,12 +369,16 @@ function xmpp_create_config {
|
|||
echo "VirtualHost \"${DEFAULT_DOMAIN_NAME}\"" >> /etc/prosody/prosody.cfg.lua
|
||||
echo ' ssl = {' >> /etc/prosody/prosody.cfg.lua
|
||||
echo " key = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.key\";" >> /etc/prosody/prosody.cfg.lua
|
||||
echo " certificate = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.pem\";" >> /etc/prosody/prosody.cfg.lua
|
||||
echo " curve = $XMPP_ECC_CURVE;" >> /etc/prosody/prosody.cfg.lua
|
||||
echo ' depth = "1";' >> /etc/prosody/prosody.cfg.lua
|
||||
echo " ciphers = $XMPP_CIPHERS;" >> /etc/prosody/prosody.cfg.lua
|
||||
echo ' options = {"no_sslv2", "no_sslv3" };' >> /etc/prosody/prosody.cfg.lua
|
||||
echo " dhparam = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.dhparam\";" >> /etc/prosody/prosody.cfg.lua
|
||||
if [ -f /etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.pem ]; then
|
||||
echo " certificate = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.pem\";" >> /etc/prosody/prosody.cfg.lua
|
||||
else
|
||||
echo " certificate = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.crt\";" >> /etc/prosody/prosody.cfg.lua
|
||||
fi
|
||||
echo " curve = $XMPP_ECC_CURVE;" >> /etc/prosody/prosody.cfg.lua
|
||||
echo ' depth = "1";' >> /etc/prosody/prosody.cfg.lua
|
||||
echo " ciphers = $XMPP_CIPHERS;" >> /etc/prosody/prosody.cfg.lua
|
||||
echo ' options = {"no_sslv2", "no_sslv3" };' >> /etc/prosody/prosody.cfg.lua
|
||||
echo " dhparam = \"/etc/prosody/certs/${DEFAULT_DOMAIN_NAME}.dhparam\";" >> /etc/prosody/prosody.cfg.lua
|
||||
echo ' }' >> /etc/prosody/prosody.cfg.lua
|
||||
echo '' >> /etc/prosody/prosody.cfg.lua
|
||||
echo 'Include "conf.d/*.cfg.lua"' >> /etc/prosody/prosody.cfg.lua
|
||||
|
|
Loading…
Reference in New Issue