You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mailu/core/admin/start.py

16 lines
614 B
Python

#!/usr/bin/python3
import os
os.system("flask mailu advertise")
os.system("flask db upgrade")
if 'INITIAL_ADMIN_ACCOUNT' in os.environ and 'INITIAL_ADMIN_DOMAIN' in os.environ and 'INITIAL_ADMIN_PW' in os.environ:
mode = 'ifmissing'
if 'INITIAL_ADMIN_MODE' in os.environ:
mode = os.environ['INITIAL_ADMIN_MODE']
os.system("flask mailu admin %s %s '%s' --mode %s" % (
os.environ['INITIAL_ADMIN_ACCOUNT'], os.environ['INITIAL_ADMIN_DOMAIN'], os.environ['INITIAL_ADMIN_PW'], mode))
os.system("gunicorn -w 4 -b :80 --access-logfile - --error-logfile - --preload 'mailu:create_app()'")