give coturn the option to run with manual certificates

This commit is contained in:
cjhille
2021-06-08 16:28:24 +00:00
parent 0ff8da7f67
commit eb2408cb17
5 changed files with 53 additions and 19 deletions

View File

@ -20,12 +20,13 @@ if [ -z "$EXTERNAL_IPv4" ]; then
fi
if [ "$ENABLE_COTURN" == true ]; then
if [ -z "$ENABLE_HTTPS_PROXY" ]; then
echo "ERROR: coturn requires the https proxy for certificate retrival."
echo "you must also set ENABLE_HTTPS_PROXY=true"
if [ -z "$ENABLE_HTTPS_PROXY" ] && [ -z "$COTURN_TLS_CERT_PATH" ]; then
echo "ERROR: coturn requires TLS certificates."
echo "Either enable the https proxy for certificate retrival"
echo "or provide a path to your certificates in .env file."
exit 1
fi
if [ "$DEV_MODE" == true ]; then
if [ -z "$ENABLE_HTTPS_PROXY" ] && [ "$DEV_MODE" == true ]; then
echo "ERROR: the https proxy can't get a certificate if ran locally and therefor coturn will never start"
echo "you should disable coturn in .env"
exit 1