Skip to content
Snippets Groups Projects
Commit b792f45c authored by Florent Thiery's avatar Florent Thiery
Browse files

add envsetup for ubicast web configuration interface, refs #21550

parent 489d8fab
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import utils
def setup(interactive=True):
# Create / update admin account
utils.log('Checking admin account')
cmds = list()
cmds.append('apt-get install python3-ubicast-webconf')
# Set password if any
settings = {
"password": utils.get_conf('WEBCONF_PWD', 'changeme'),
"port": utils.get_conf('WEBCONF_PORT', '9999'),
}
with open('webconf.json.template', 'r') as f:
d = f.read()
with open('/etc/webconf.json', 'w') as f:
f.write(d.format(**settings))
{
"listen_ip": "0.0.0.0",
"password": "{password}",
"port": {port}
}
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