From e325e65b5136875097759fa4210c2032a8a41216 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu>
Date: Wed, 18 Jan 2017 18:04:19 +0100
Subject: [PATCH] Added lives conf file in wowza setup (refs #20026).

---
 203.HCA/0_setup.py | 2 ++
 5.Wowza/0_setup.py | 8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/203.HCA/0_setup.py b/203.HCA/0_setup.py
index f7defd93..6792b7e3 100644
--- a/203.HCA/0_setup.py
+++ b/203.HCA/0_setup.py
@@ -1,5 +1,7 @@
 #!/usr/bin/python3
 # -*- coding: utf-8 -*-
+import os
+
 import utils
 
 
diff --git a/5.Wowza/0_setup.py b/5.Wowza/0_setup.py
index 4c603f13..a1ca4691 100644
--- a/5.Wowza/0_setup.py
+++ b/5.Wowza/0_setup.py
@@ -33,6 +33,14 @@ def setup(interactive=True):
         '/etc/init.d/WowzaStreamingEngine restart',
         '/etc/init.d/WowzaStreamingEngineManager restart',
     ]
+    ms_conf = '/etc/mediaserver/lives_conf.py'
+    if os.path.exists(ms_conf):
+        utils.log('The file "%s" already exists, it will not be changed.' % ms_conf)
+    else:
+        cmds.extend([
+            'mkdir -p /etc/mediaserver',
+            'echo "RTMP_PWD = \'%s\'" > %s' % (utils.get_conf('WOWZA_LIVE_PWD'), ms_conf),
+        ])
     if utils.get_conf('WOWZA_SERVER_NAME'):
         cmds.append('mkdir -p /var/www/streaming')
     if os.path.exists('/home/ftp/storage/www'):
-- 
GitLab