Skip to content

Commit

Permalink
Merge branch 'thelittlefireman-patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ric Harvey committed Aug 18, 2017
2 parents ed8e195 + ff96495 commit cba9b65
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# 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
echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config

if [[ "$GIT_USE_SSH" == "1" ]] ; then
Expand Down Expand Up @@ -74,6 +76,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 "." /usr/local/etc/php-fpm.conf | tail -1)"
if [[ $lastlinephpconf == *"php_flag[display_errors]"* ]]; then
sed -i '$ d' /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
Expand Down

0 comments on commit cba9b65

Please sign in to comment.