Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | set -e |
| 4 | |
Nico Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame^] | 5 | { |
| 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 Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 24 | chown -R www-data:www-data /var/cache/simpleid/ |
| 25 | chown -R www-data:www-data /var/lib/simpleid/ |
Nico Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame^] | 26 | chown -R www-data:www-data /var/db/simpleid/ |
| 27 | chown -R www-data:www-data /var/www/html/ |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 28 | chown -R www-data:www-data /var/log/ |
| 29 | |
Nico Huber | d652872 | 2023-07-01 14:38:39 +0000 | [diff] [blame^] | 30 | chmod -R a-w /var/db/simpleid/ /var/www/html/ |
| 31 | |
Nico Huber | 8cd50ee | 2023-06-24 15:35:16 +0000 | [diff] [blame] | 32 | exec docker-php-entrypoint php-fpm "$@" |