Mercurial > sat_docs
comparison 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 |
comparison
equal
deleted
inserted
replaced
163:a63f6d360326 | 164:29873a41aae1 |
---|---|
1 #!/usr/bin/env python2 | |
2 # This script launch Salut with domain and secret gotten from prosody container | |
3 # it make the configuration more easy | |
4 import os, xmlrpclib | |
5 | |
6 SALUT_PATH="/usr/share/sat_salut/" | |
7 os.chdir("/home/sat") | |
8 proxy = xmlrpclib.ServerProxy("http://prosody:9999/") | |
9 for var in ("DOMAIN", "SAT_SALUT_SECRET"): | |
10 os.environ[var] = proxy.getenv(var) | |
11 os.environ["PYTHONPATH"] = SALUT_PATH | |
12 os.execlp("twistd", "twistd", "-ny", SALUT_PATH+"salut.tac", "--pidfile", "/tmp/salut.pid") |