From af54696b625943d5880e04dd949d3f311bcde66f Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Mon, 5 Sep 2022 17:21:46 -0400 Subject: [PATCH] first attempt --- management/wsgi.py | 6 ++++++ setup/management.sh | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 management/wsgi.py diff --git a/management/wsgi.py b/management/wsgi.py new file mode 100644 index 00000000..4eb3902d --- /dev/null +++ b/management/wsgi.py @@ -0,0 +1,6 @@ +from daemon import app + +app.logger.addHandler(utils.create_syslog_handler()) + +if __name__ == "__main__": + app.run(port=10222) \ No newline at end of file diff --git a/setup/management.sh b/setup/management.sh index cfac5db9..69cd3b2b 100755 --- a/setup/management.sh +++ b/setup/management.sh @@ -99,7 +99,8 @@ export LANG=en_US.UTF-8 export LC_TYPE=en_US.UTF-8 source $venv/bin/activate -exec python $(pwd)/management/daemon.py +cd $(pwd)/management +exec gunicorn -b localhost:10222 -w 2 wsgi:app EOF chmod +x $inst_dir/start cp --remove-destination conf/mailinabox.service /lib/systemd/system/mailinabox.service # target was previously a symlink so remove it first