diff --git a/scripts/start.sh b/scripts/start.sh index 30095d1..4d4a91d 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -3,6 +3,10 @@ # Disable Strict Host checking for non interactive git clones mkdir -p -m 0700 /root/.ssh +# Prevent config files from being filled to infinity by force of stop and restart the container +echo "" > /root/.ssh/config +/usr/local/etc/php-fpm.conf + echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config if [[ "$GIT_USE_SSH" == "1" ]] ; then @@ -75,6 +79,13 @@ if [ -f /var/www/html/conf/nginx/nginx-site-ssl.conf ]; then cp /var/www/html/conf/nginx/nginx-site-ssl.conf /etc/nginx/sites-available/default-ssl.conf fi + +# Prevent config files from being filled to infinity by force of stop and restart the container +lastlinephpconf="$(grep "." ./run_example.sh | tail -1)" +if [[ $lastlinephpconf == *"php_flag[display_errors]"* ]]; then + sed '$' /usr/local/etc/php-fpm.conf +fi + # Display PHP error's or not if [[ "$ERRORS" != "1" ]] ; then echo php_flag[display_errors] = off >> /usr/local/etc/php-fpm.conf