1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-14 17:27:23 +01:00

Trying to create the api key before launch so multiple workers do not conflict

This commit is contained in:
Steve Hay
2022-09-05 20:18:09 -04:00
parent b7b334ac0b
commit f2227de85a
2 changed files with 15 additions and 12 deletions

View File

@@ -98,9 +98,12 @@ export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_TYPE=en_US.UTF-8
mkdir -p /var/lib/mailinabox
{ tr -cd '[:xdigit:]' < /dev/urandom | head -c 32 } > /var/lib/mailinabox/api.key
source $venv/bin/activate
export PYTHONPATH=$(pwd)/management
exec gunicorn -b localhost:10222 -w 1 wsgi:app
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