diff --git a/src/addons.js b/src/addons.js index d6e54e4e8..ed7687974 100644 --- a/src/addons.js +++ b/src/addons.js @@ -777,6 +777,9 @@ function setupTurn(app, options, callback) { assert.strictEqual(typeof options, 'object'); assert.strictEqual(typeof callback, 'function'); + var turnSecret = safe.fs.readFileSync(paths.ADDON_TURN_SECRET_FILE, 'utf8'); + if (!turnSecret) console.error('No turn secret set. Will leave emtpy, but this is a problem!'); + const env = [ { name: 'CLOUDRON_STUN_SERVER', value: settings.adminFqdn() }, { name: 'CLOUDRON_STUN_PORT', value: '3478' }, @@ -784,7 +787,7 @@ function setupTurn(app, options, callback) { { name: 'CLOUDRON_TURN_SERVER', value: settings.adminFqdn() }, { name: 'CLOUDRON_TURN_PORT', value: '3478' }, { name: 'CLOUDRON_TURN_TLS_PORT', value: '5349' }, - { name: 'CLOUDRON_TURN_SECRET', value: 'unused' } + { name: 'CLOUDRON_TURN_SECRET', value: turnSecret } ]; debugApp(app, 'Setting up TURN');