diff --git a/setup/management.sh b/setup/management.sh index 648219fd..cebed8d5 100755 --- a/setup/management.sh +++ b/setup/management.sh @@ -90,6 +90,7 @@ rm -f /tmp/bootstrap.zip # Create an init script to start the management daemon and keep it # running after a reboot. +# Note: Authentication currently breaks with more than 1 gunicorn worker. cat > $inst_dir/start < /var/lib/mailinabox/api.key +chmod 640 /var/lib/mailinabox/api.key source $venv/bin/activate export PYTHONPATH=$(pwd)/management -exec gunicorn -b localhost:10222 -w 2 wsgi:app +exec gunicorn -b localhost:10222 -w 1 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