#!/bin/bash # certs rm -rf /etc/prosody/fixed-certs cp -r /etc/prosody/certs /etc/prosody/fixed-certs find /etc/prosody/fixed-certs -type f -print0 | xargs --null -I{} mv {} {}.pem chown -R prosody:prosody /etc/prosody/fixed-certs # “templating” sed -i \ -e "s/@@DOMAIN@@/${DOMAIN}/" \ -e "s/@@ADMIN_USER@@/${ADMIN_USER}/" \ -e "s/@@LDAP_SERVER@@/${LDAP_SERVER}/" \ -e "s/@@LDAP_BASE@@/${LDAP_BASE}/" \ -e "s/@@LDAP_USER@@/${LDAP_USER}/" \ -e "s/@@LDAP_PASSWORD@@/${LDAP_PASSWORD}/" \ /etc/prosody/prosody.cfg.lua exec prosody