#!/usr/bin/python3 # -*- coding: utf-8 -*- import utils def setup(interactive=True): dir_path = utils.get_dir(__file__) cmds = [ 'apt-get install --yes celerity-server', dict(line='write', template='%s/celerity-config.py' % dir_path, target='/etc/celerity/config.py', params=( ('{{ signing_key }}', utils.get_conf('celerity_signing_key', 'undefined')), ('{{ ms_server_name }}', utils.get_conf('ms_server_name', 'undefined')), ('{{ ms_id }}', utils.get_conf('ms_id', 'ms_id')), ('{{ ms_api_key }}', utils.get_conf('ms_api_key', 'ms_api_key')), )), 'service celerity-server restart', ] utils.run_commands(cmds)