Allow to configure the bind address and ports for lgproxy.py

This commit is contained in:
Baptiste Jonglez 2014-12-15 20:49:00 +01:00
parent dd434d01b4
commit 51b35242fa
2 changed files with 5 additions and 1 deletions

View file

@ -6,6 +6,10 @@ DEBUG = False
LOG_FILE = "/var/log/bird-lg/lgproxy.log"
LOG_LEVEL = "WARNING"
# Which IP/port to listen to for the frontend
BIND_IP = "0.0.0.0"
BIND_PORT = 5000
# Who can connect to the proxy to launch Bird commands
ACCESS_LIST = ["192.0.2.42", "2001:db8::42"]

View file

@ -111,5 +111,5 @@ def bird():
if __name__ == "__main__":
app.logger.info("lgproxy start")
app.run("0.0.0.0")
app.run(app.config.get("BIND_IP", "0.0.0.0"), app.config.get("BIND_PORT", 5000))