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

remove unused webinterface target

parent b5643b60
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import utils
import os
def setup(interactive=True):
utils.log('Installing webconf')
cmds = (
'apt-get install python3-ubicast-webconf',
'systemctl enable ubicast-webconf',
'systemctl start ubicast-webconf'
)
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))
utils.log('/etc/webconf.json written')
if not os.path.exists('/etc/apt/sources.list.d/skyreach.list'):
raise Exception('skyreach repository not available, cannot install package python3-ubicast-webconf')
else:
utils.run_commands(cmds)
{{
"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