29 lines
1.1 KiB
Bash
Raw Normal View History

2017-08-27 16:31:04 +02:00
#!/bin/sh
2018-01-13 14:57:15 +01:00
# Set attachment size limit
2023-10-18 15:22:10 +01:00
sed -i "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /etc/php81/php-fpm.conf /etc/nginx/nginx.conf
sed -i "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /etc/php81/php-fpm.conf
2017-08-27 16:31:04 +02: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"
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
2023-10-18 15:22:10 +01:00
sed -i "s/.*error_log.*$/error_log = \/dev\/stdout/" /etc/php81/php-fpm.conf
fi
# Add postfixadmin-change-password plugin
2018-03-03 23:01:08 +01:00
mkdir -p /rainloop/data/_data_/_default_/plugins/
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