view docker/salut/scripts/salut @ 143:dd83138a9b1d

screenshots (0.7): added capture of Primtivus chat (0.7.0b2)
author Goffi <goffi@goffi.org>
date Sun, 23 Jun 2019 20:04:59 +0200
parents b69056368901
children
line wrap: on
line source

#!/usr/bin/env python2
# This script launch Salut with domain and secret gotten from prosody container
# it make the configuration more easy
import os, xmlrpclib

SALUT_PATH="/usr/share/sat_salut/"
os.chdir("/home/sat")
proxy = xmlrpclib.ServerProxy("http://prosody:9999/")
for var in ("DOMAIN", "SAT_SALUT_SECRET"):
    os.environ[var] = proxy.getenv(var)
os.environ["PYTHONPATH"] = SALUT_PATH
os.execlp("twistd", "twistd", "-ny", SALUT_PATH+"salut.tac", "--pidfile", "/tmp/salut.pid")