2017-08-27 16:31:04 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2018-01-13 14:57:15 +01:00
|
|
|
# Set attachment size limit
|
2024-06-12 07:32:16 +01:00
|
|
|
sed -i "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /etc/php83/php-fpm.conf /etc/nginx/nginx.conf
|
|
|
|
sed -i "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /etc/php83/php-fpm.conf
|
2017-08-27 16:31:04 +02:00
|
|
|
|
2018-02-03 21:34:59 +01:00
|
|
|
# Remove postfixadmin-change-password plugin if exist
|
|
|
|
if [ -d "/rainloop/data/_data_/_default_/plugins/postfixadmin-change-password" ]; then
|
|
|
|
rm -rf /rainloop/data/_data_/_default_/plugins/postfixadmin-change-password
|
|
|
|
fi
|
|
|
|
|
2018-06-18 10:11:04 +02:00
|
|
|
# Set log output to STDOUT if wanted (LOG_TO_STDOUT=true)
|
2018-06-22 09:13:40 +02:00
|
|
|
if [ "$LOG_TO_STDOUT" = true ]; then
|
|
|
|
echo "[INFO] Logging to stdout activated"
|
2018-06-18 10:09:21 +02:00
|
|
|
chmod o+w /dev/stdout
|
2018-06-18 10:40:03 +02:00
|
|
|
sed -i "s/.*error_log.*$/error_log \/dev\/stdout warn;/" /etc/nginx/nginx.conf
|
2024-06-12 07:32:16 +01:00
|
|
|
sed -i "s/.*error_log.*$/error_log = \/dev\/stdout/" /etc/php83/php-fpm.conf
|
2018-06-18 10:09:21 +02:00
|
|
|
fi
|
|
|
|
|
2018-02-03 21:34:59 +01:00
|
|
|
# Add postfixadmin-change-password plugin
|
2018-03-03 23:01:08 +01:00
|
|
|
mkdir -p /rainloop/data/_data_/_default_/plugins/
|
2018-02-03 21:34:59 +01:00
|
|
|
cp -r /usr/local/include/postfixadmin-change-password /rainloop/data/_data_/_default_/plugins/
|
|
|
|
|
2017-08-27 16:31:04 +02:00
|
|
|
# Fix permissions
|
2018-01-13 14:57:15 +01:00
|
|
|
chown -R $UID:$GID /rainloop/data /services /var/log /var/lib/nginx
|
2017-08-27 16:31:04 +02:00
|
|
|
|
|
|
|
# RUN !
|
2018-01-13 14:57:15 +01:00
|
|
|
exec su-exec $UID:$GID /bin/s6-svscan /services
|