Skip to content

Commit cba9b65

Browse files
author
Ric Harvey
committed
Merge branch 'thelittlefireman-patch-1'
2 parents ed8e195 + ff96495 commit cba9b65

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/start.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# Disable Strict Host checking for non interactive git clones
44

55
mkdir -p -m 0700 /root/.ssh
6+
# Prevent config files from being filled to infinity by force of stop and restart the container
7+
echo "" > /root/.ssh/config
68
echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config
79

810
if [[ "$GIT_USE_SSH" == "1" ]] ; then
@@ -74,6 +76,13 @@ if [ -f /var/www/html/conf/nginx/nginx-site-ssl.conf ]; then
7476
cp /var/www/html/conf/nginx/nginx-site-ssl.conf /etc/nginx/sites-available/default-ssl.conf
7577
fi
7678

79+
80+
# Prevent config files from being filled to infinity by force of stop and restart the container
81+
lastlinephpconf="$(grep "." /usr/local/etc/php-fpm.conf | tail -1)"
82+
if [[ $lastlinephpconf == *"php_flag[display_errors]"* ]]; then
83+
sed -i '$ d' /usr/local/etc/php-fpm.conf
84+
fi
85+
7786
# Display PHP error's or not
7887
if [[ "$ERRORS" != "1" ]] ; then
7988
echo php_flag[display_errors] = off >> /usr/local/etc/php-fpm.conf

0 commit comments

Comments
 (0)