Skip to content
Snippets Groups Projects
Commit 0d0c13c5 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Set msmonitor password.

parent 14481177
No related branches found
No related tags found
No related merge requests found
...@@ -39,7 +39,7 @@ def setup(interactive=True): ...@@ -39,7 +39,7 @@ def setup(interactive=True):
utils.run_commands(cmds) utils.run_commands(cmds)
# Set ubicast password if any # Set ubicast password if any
pwd = utils.get_conf('SHELL_UBICAST_PWD') pwd = utils.get_conf('SHELL_UBICAST_PWD')
if pwd and pwd != 'test': if pwd:
p = subprocess.Popen(['passwd', '-q', 'ubicast'], stdin=subprocess.PIPE) p = subprocess.Popen(['passwd', '-q', 'ubicast'], stdin=subprocess.PIPE)
p.communicate(input=b'%(pwd)s\n%(pwd)s' % dict(pwd=pwd.encode('utf-8'))) p.communicate(input=b'%(pwd)s\n%(pwd)s' % dict(pwd=pwd.encode('utf-8')))
if p.returncode != 0: if p.returncode != 0:
......
...@@ -21,7 +21,7 @@ def setup(interactive=True): ...@@ -21,7 +21,7 @@ def setup(interactive=True):
utils.run_commands(cmds) utils.run_commands(cmds)
# Set password if any # Set password if any
pwd = utils.get_conf('SHELL_ADMIN_PWD') pwd = utils.get_conf('SHELL_ADMIN_PWD')
if pwd and pwd != 'test': if pwd:
p = subprocess.Popen(['passwd', '-q', 'admin'], stdin=subprocess.PIPE) p = subprocess.Popen(['passwd', '-q', 'admin'], stdin=subprocess.PIPE)
p.communicate(input=b'%(pwd)s\n%(pwd)s' % dict(pwd=pwd.encode('utf-8'))) p.communicate(input=b'%(pwd)s\n%(pwd)s' % dict(pwd=pwd.encode('utf-8')))
if p.returncode != 0: if p.returncode != 0:
......
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import subprocess
import utils
def setup(interactive=True):
cmds = [
'apt-get install -y python3-mediaserver-monitor',
]
utils.run_commands(cmds)
# Set ubicast password if any
pwd = utils.get_conf('MONITOR_SHELL_PWD')
if pwd:
p = subprocess.Popen(['passwd', '-q', 'msmonitor'], stdin=subprocess.PIPE)
p.communicate(input=b'%(pwd)s\n%(pwd)s' % dict(pwd=pwd.encode('utf-8')))
if p.returncode != 0:
raise Exception('Failed to set msmonitor account password.')
utils.log('\033[1;33m The msmonitor account password has been set. \033[0m')
#!/bin/bash
apt-get install -y -o Dpkg::Options::="--force-confdef" python3-mediaserver-monitor
...@@ -28,9 +28,9 @@ APT_CACHE_HOST='panel.ubicast.eu' ...@@ -28,9 +28,9 @@ APT_CACHE_HOST='panel.ubicast.eu'
# -- Shell -- # -- Shell --
# ubicast shell account # ubicast shell account
SHELL_UBICAST_PWD='test' SHELL_UBICAST_PWD=
# customer shell account # customer shell account
SHELL_ADMIN_PWD='test' SHELL_ADMIN_PWD=
# -- Emails -- # -- Emails --
EMAIL_SMTP_SERVER= EMAIL_SMTP_SERVER=
...@@ -56,6 +56,7 @@ MS_ADMIN_PWD='test' ...@@ -56,6 +56,7 @@ MS_ADMIN_PWD='test'
MONITOR_SERVER_NAME='monitor' MONITOR_SERVER_NAME='monitor'
MONITOR_SUPERUSER_PWD='test' MONITOR_SUPERUSER_PWD='test'
MONITOR_ADMIN_PWD='test' MONITOR_ADMIN_PWD='test'
MONITOR_SHELL_PWD=
# -- Campus Manager -- # -- Campus Manager --
CM_SERVER_NAME='campusmanager' CM_SERVER_NAME='campusmanager'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment