coreos-home-server/service/coturn/container/run-coturn
Alex Palaistras f7a92c7acf coturn: Use dedicated coturn user for daemon
Previously, we'd use the Debian-provided `turnserver` user, which is no
longer available in source builds; we now create and use a dedicated
`coturn` user for more consistency with other services.
2023-12-22 18:34:37 +00:00

14 lines
369 B
Bash
Executable File

#!/bin/sh
set -eu
# Correct permissions where needed.
chown -R coturn:coturn /var/lib/coturn
# Prepare configuration files for environment variable substitution.
ENV_NAMES="$(env | awk -F '=' '{printf "$%s ", $1}')"
for file in /etc/coturn/*.template; do
envsubst "$ENV_NAMES" < "$file" > "${file%.template}"
done
/usr/bin/turnserver -c /etc/coturn/turnserver.conf