comparison docker_legacy/sat_pubsub/scripts/sat_pubsub @ 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 # -*- coding: utf-8 -*-
3
4 # This script launch SàT PubSub with domain and secret gotten from prosody container
5 # it make the configuration more easy
6 import os, xmlrpclib
7
8 os.chdir("/usr/share/sat_pubsub")
9 proxy = xmlrpclib.ServerProxy("http://prosody:9999/")
10 domain = proxy.getenv("DOMAIN")
11 secret = proxy.getenv("SAT_PUBSUB_SECRET")
12 os.execlp("twistd", "twistd", "-n", "--pidfile", "/tmp/sat_pubsub.pid", "sat_pubsub", "--rhost", "prosody",
13 "--jid", "pubsub.%s" % domain, "--secret", secret)