coreos-home-server/service/spectrum/container/run-spectrum
Alex Palaistras 4d26ccb8eb nginx: Add default user to shared GID=10000
Users and groups used within Podman containers are usually assigned UID
and GID 10000. Files for these containers are sometimes served by Nginx,
and may be given permissions that restrict access to those outside the
group, but which are intended to be served nonetheless.

This commit adds the pre-defined `nginx` user to a `nginx-shared` group
with GID 10000, which will then allow access to these files as needed.
2022-05-04 11:29:53 +01:00

14 lines
452 B
Bash
Executable File

#!/bin/sh
# Prepare configuration files for environment variable substitution.
ENV_NAMES="$(env | awk -F '=' '{printf "$%s ", $1}')"
for file in /etc/spectrum2/*.template; do
envsubst "${ENV_NAMES}" < "${file}" > $(echo "${file}" | awk -F '.template$' '{print $1}')
done
# Correct permissions for data files.
chown -R spectrum:spectrum /var/lib/spectrum2 /var/lib/spectrum2-media
# Run entrypoint.
/usr/bin/spectrum2 -n /etc/spectrum2/spectrum.cfg