2021-03-21 12:23:35 +00:00
|
|
|
#!/bin/sh
|
2023-12-22 11:19:38 +00:00
|
|
|
set -eu
|
2021-03-21 12:23:35 +00:00
|
|
|
|
2023-08-13 12:36:25 +00:00
|
|
|
# Correct permissions where needed.
|
|
|
|
chown -R biboumi:biboumi /var/lib/biboumi
|
|
|
|
|
2021-03-21 12:23:35 +00:00
|
|
|
# Prepare configuration files for environment variable substitution.
|
2023-12-22 11:19:38 +00:00
|
|
|
ENV_NAMES="$(env | awk -F '=' '{printf "$%s ", $1}')"
|
2021-03-21 12:23:35 +00:00
|
|
|
for file in /etc/biboumi/*.template; do
|
2023-12-22 11:19:38 +00:00
|
|
|
envsubst "$ENV_NAMES" < "$file" > "${file%.template}"
|
2021-03-21 12:23:35 +00:00
|
|
|
done
|
|
|
|
|
2023-08-13 12:36:25 +00:00
|
|
|
gosu biboumi /usr/bin/biboumi /etc/biboumi/biboumi.cfg "$@"
|