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

This commit is contained in:
Steve Hay committed 2022-09-05 20:18:09 -04:00
1 parent b7b334ac0b
commit f2227de85a
2 files changed
+15 -12

No files matched your search

+4 -1
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