15 lines
348 B
Bash
Executable file
15 lines
348 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
# copy default config file, if the config file doesn't exist.
|
|
if [ ! -f /data/turnserver.conf ]; then
|
|
cp /etc/coturn/turnserver.conf.default /data/turnserver.conf
|
|
fi
|
|
|
|
# chown data
|
|
chown -R ${UID}:${GID} /data
|
|
|
|
# run coturn
|
|
su-exec ${UID}:${GID} turnserver \
|
|
-c /data/turnserver.conf \
|
|
--db /data/user.db \
|
|
--prod
|