Mercurial > sat_docs
diff docker_legacy/salut/scripts/salut @ 164:29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 01 Jan 2021 18:33:52 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docker_legacy/salut/scripts/salut Fri Jan 01 18:33:52 2021 +0100 @@ -0,0 +1,12 @@ +#!/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")