Skip to content

Commit b24b195

Browse files
Merge pull request #65 from Tokugero/master
Resolving php-local.ini mangling
2 parents b2f069f + 608466e commit b24b195

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

root/etc/cont-init.d/50-config

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,14 @@ fi
6161
[ -n "${APP_URL}" ] && sed -r "s,([#\s]*)?APP_URL=.*,APP_URL=${APP_URL},g" -i /config/www/.env
6262

6363
## Bump php upload max filesize and post max size to 100MB by default
64-
grep -qxF 'upload_max_filesize' /config/php/php-local.ini || echo 'upload_max_filesize = 100MB' >> /config/php/php-local.ini
65-
grep -qxF 'post_max_size' /config/php/php-local.ini || echo 'post_max_size = 100MB' >> /config/php/php-local.ini
64+
grep -qx '^upload_max_filesize.*$' /config/php/php-local.ini || echo 'upload_max_filesize = 100M' >> /config/php/php-local.ini
65+
grep -qx '^post_max_size.*$' /config/php/php-local.ini || echo 'post_max_size = 100M' >> /config/php/php-local.ini
66+
67+
68+
## TODO: Remove this following bit by 12/19/2020
69+
# Remove erronously added configs post-init
70+
sed -i "s/^upload_max_filesize = 100MB$//g" /config/php/php-local.ini
71+
sed -i "s/^post_max_size = 100MB$//g" /config/php/php-local.ini
6672

6773
# check for the mysql endpoint for 30 seconds
6874
END=$((SECONDS+30))

0 commit comments

Comments
 (0)