blob: 66782409c08fe247ef409f30f4c7e16f1bf6ee8c [file] [log] [blame]
#!/bin/sh
set -e
{
domain=${SA_PUBLIC_DOMAIN_NAME:-miau.local}
ids=/var/db/simpleid
html=/var/www/html
mkdir -p ${ids}
rm -rf ${html}
cp -a /var/www/simpleid ${html}
for tmpl in /var/db/simpleid-templates/*.identity; do
id=$(basename ${tmpl})
sed "s/miau.local/${domain}/" ${tmpl} >${ids}/${id}
done
for f in /var/www/simpleid/config.php; do
sed "s/miau.local/${domain}/" ${f} >${html}/$(basename ${f})
done
}
chown -R www-data:www-data /var/cache/simpleid/
chown -R www-data:www-data /var/lib/simpleid/
chown -R www-data:www-data /var/log/
chown -R root:root /var/db/simpleid/
chown -R root:root /var/www/html/
chmod -R a-w /var/db/simpleid/ /var/www/html/
exec docker-php-entrypoint php-fpm "$@"