This repository has been archived on 2019-03-27. You can view files and clone it, but cannot push or open issues/pull-requests.
prosody/entrypoint.sh

19 lines
561 B
Bash
Executable File

#!/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