blob: fd854081fe7262c887dd5abbfdcac19feffe7321 [file] [log] [blame]
Nico Huber8cd50ee2023-06-24 15:35:16 +00001#!/bin/sh
2
3set -e
4
Nico Huberd6528722023-07-01 14:38:39 +00005{
6 domain=${SA_PUBLIC_DOMAIN_NAME:-miau.local}
7 ids=/var/db/simpleid
8 html=/var/www/html
9
10 mkdir -p ${ids}
11 rm -rf ${html}
12 cp -a /var/www/simpleid ${html}
13
14 for tmpl in /var/db/simpleid-templates/*.identity; do
15 id=$(basename ${tmpl})
16 sed "s/miau.local/${domain}/" ${tmpl} >${ids}/${id}
17 done
18
19 for f in /var/www/simpleid/config.php; do
20 sed "s/miau.local/${domain}/" ${f} >${html}/$(basename ${f})
21 done
22}
23
Nico Huber8cd50ee2023-06-24 15:35:16 +000024chown -R www-data:www-data /var/cache/simpleid/
25chown -R www-data:www-data /var/lib/simpleid/
Nico Huberd6528722023-07-01 14:38:39 +000026chown -R www-data:www-data /var/db/simpleid/
27chown -R www-data:www-data /var/www/html/
Nico Huber8cd50ee2023-06-24 15:35:16 +000028chown -R www-data:www-data /var/log/
29
Nico Huberd6528722023-07-01 14:38:39 +000030chmod -R a-w /var/db/simpleid/ /var/www/html/
31
Nico Huber8cd50ee2023-06-24 15:35:16 +000032exec docker-php-entrypoint php-fpm "$@"