diff --git a/bot.conf.example b/bot.conf.example index 6f0a493c..4335124b 100644 --- a/bot.conf.example +++ b/bot.conf.example @@ -9,6 +9,7 @@ tls-certificate = # key/cert used for REST API tls-api-key = tls-api-certificate = +api-port = # the default channel BitBot automatically joins bot-channel = diff --git a/modules/rest_api.py b/modules/rest_api.py index bd5aca40..4784aa60 100644 --- a/modules/rest_api.py +++ b/modules/rest_api.py @@ -126,7 +126,8 @@ class Module(ModuleManager.BaseModule): self.httpd = None if self.bot.get_setting("rest-api", False): - self.httpd = http.server.HTTPServer(("", 5000), Handler) + port = int(self.bot.config.get("api-port", "5000")) + self.httpd = http.server.HTTPServer(("", port), Handler) self.httpd.socket = utils.security.ssl_wrap(self.httpd.socket, cert=self.bot.config["tls-api-certificate"],