2018-10-31 19:17:23 +02:00
|
|
|
#!/usr/bin/python3
|
2018-10-22 18:01:59 +03:00
|
|
|
|
|
|
|
import os
|
|
|
|
|
2018-11-08 21:43:05 +01:00
|
|
|
os.system("flask mailu advertise")
|
|
|
|
os.system("flask db upgrade")
|
2019-01-25 16:04:20 +02:00
|
|
|
|
2019-08-21 16:34:25 +03:00
|
|
|
account = os.environ.get("INITIAL_ADMIN_ACCOUNT")
|
|
|
|
domain = os.environ.get("INITIAL_ADMIN_DOMAIN")
|
|
|
|
password = os.environ.get("INITIAL_ADMIN_PW")
|
|
|
|
|
|
|
|
if account is not None and domain is not None and password is not None:
|
|
|
|
mode = os.environ.get("INITIAL_ADMIN_MODE", default="ifmissing")
|
|
|
|
os.system("flask mailu admin %s %s '%s' --mode %s" % (account, domain, password, mode))
|
2019-01-25 16:04:20 +02:00
|
|
|
|
2018-11-08 21:43:05 +01:00
|
|
|
os.system("gunicorn -w 4 -b :80 --access-logfile - --error-logfile - --preload 'mailu:create_app()'")
|