blob: 0c2ff96d914d0e141c2b359ffc8877f332ee1bc3 [file] [log] [blame]
Nico Huberd6528722023-07-01 14:38:39 +00001#!/bin/sh
2
3set -e
4
5{
6 domain=${SA_PUBLIC_DOMAIN_NAME:-miau.local}
7 html=/var/www/html
8
9 rm -rf ${html}
10 cp -a /var/www/simpleid ${html}
11
12 for tmpl in /var/db/simpleid-templates/*.identity; do
13 ref=$(dirname ${tmpl})/$(basename ${tmpl} .identity)
14 name=$(basename ${ref})
15 sed "s/miau.local/${domain}/" ${ref} >${html}/${name}
16 done
17
18 for f in /etc/nginx/conf.d/sa.conf; do
19 sed "s/miau.local/${domain}/" ${f}.template >${f}
20 done
21}
22
23chown -R nginx:nginx /var/www/html/
24
25chmod -R a-w /etc/nginx/conf.d/sa.conf /var/www/html/
26
27exec /docker-entrypoint.sh "$@"