1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-05-23 22:40:16 +02:00

20 lines
530 B
Python
Raw Normal View History

2018-10-23 11:58:36 +03:00
#!/usr/bin/python3
import os
import logging as log
import sys
from socrate import conf
2018-12-07 13:37:40 +02:00
2019-01-08 05:16:05 +02:00
log.basicConfig(stream=sys.stderr, level=os.environ.get("LOG_LEVEL", "WARNING"))
2018-12-07 13:37:40 +02:00
os.environ["MAX_FILESIZE"] = str(int(int(os.environ.get("MESSAGE_SIZE_LIMIT"))*0.66/1048576))
conf.jinja("/php.ini", os.environ, "/usr/local/etc/php/conf.d/roundcube.ini")
2018-10-23 11:58:36 +03:00
# Fix some permissions
os.system("mkdir -p /data/gpg")
os.system("chown -R www-data:www-data /data")
# Run apache
os.execv("/usr/local/bin/apache2-foreground", ["apache2-foreground"])