mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-11 01:27:17 +00:00
changed back to 1 gunicorn worker.
This commit is contained in:
parent
8fdd11d4c6
commit
0732866a2d
@ -90,6 +90,7 @@ rm -f /tmp/bootstrap.zip
|
|||||||
|
|
||||||
# Create an init script to start the management daemon and keep it
|
# Create an init script to start the management daemon and keep it
|
||||||
# running after a reboot.
|
# running after a reboot.
|
||||||
|
# Note: Authentication currently breaks with more than 1 gunicorn worker.
|
||||||
cat > $inst_dir/start <<EOF;
|
cat > $inst_dir/start <<EOF;
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Set character encoding flags to ensure that any non-ASCII don't cause problems.
|
# Set character encoding flags to ensure that any non-ASCII don't cause problems.
|
||||||
@ -100,10 +101,11 @@ export LC_TYPE=en_US.UTF-8
|
|||||||
|
|
||||||
mkdir -p /var/lib/mailinabox
|
mkdir -p /var/lib/mailinabox
|
||||||
tr -cd '[:xdigit:]' < /dev/urandom | head -c 32 > /var/lib/mailinabox/api.key
|
tr -cd '[:xdigit:]' < /dev/urandom | head -c 32 > /var/lib/mailinabox/api.key
|
||||||
|
chmod 640 /var/lib/mailinabox/api.key
|
||||||
|
|
||||||
source $venv/bin/activate
|
source $venv/bin/activate
|
||||||
export PYTHONPATH=$(pwd)/management
|
export PYTHONPATH=$(pwd)/management
|
||||||
exec gunicorn -b localhost:10222 -w 2 wsgi:app
|
exec gunicorn -b localhost:10222 -w 1 wsgi:app
|
||||||
EOF
|
EOF
|
||||||
chmod +x $inst_dir/start
|
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
|
cp --remove-destination conf/mailinabox.service /lib/systemd/system/mailinabox.service # target was previously a symlink so remove it first
|
||||||
|
Loading…
Reference in New Issue
Block a user