1
0
Fork 0
mirror of https://github.com/24eme/signaturepdf synced 2026-03-14 13:55:44 +01:00
24eme-signaturepdf/entrypoint.sh
Luc Didry 85877244b5
🎨 — Improve shell scripts
- make them pass shellcheck
- add set -euo pipefail
- simplify sed commands
2025-05-27 17:26:52 +02:00

17 lines
614 B
Bash
Executable file

#! /bin/bash
envsubst < /usr/local/signaturepdf/config/apache.conf > /etc/apache2/sites-available/signaturepdf.conf
envsubst < /usr/local/signaturepdf/config/php.ini > /usr/local/etc/php/conf.d/uploads.ini
envsubst < /usr/local/signaturepdf/config/config.ini.tpl > /usr/local/signaturepdf/config/config.ini
sed -i "/$DEFAULT_LANGUAGE/s/^# //g" /etc/locale.gen && locale-gen
export LANG=$DEFAULT_LANGUAGE
export LANGUAGE=$DEFAULT_LANGUAGE
export LC_ALL=$DEFAULT_LANGUAGE
if [[ -n $PDF_STORAGE_PATH ]] ; then
mkdir -p "$PDF_STORAGE_PATH"
chown www-data:www-data "$PDF_STORAGE_PATH"
fi
apache2-foreground