mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 21:50:46 +00:00
Alex Palaistras
4d26ccb8eb
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.
14 lines
452 B
Bash
Executable File
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
|