Prevent config files from being filled to infinity
When you start/stop Successively your container, the file /root/.ssh/conf and /usr/local/etc/php-fpm.conf grow to infinity : loop repetition of line "; Include one or more files. If glob(3) exists, it is used to include a bunch of ; files from a glob(3) pattern. This directive can be used everywhere in the ; file. ; Relative path can also be used. They will be prefixed by: ; - the global prefix if it's been set (-p argument) ; - /usr/local otherwise include=etc/php-fpm.d/*.conf php_flag[display_errors] = off php_flag[display_errors] = off php_flag[display_errors] = off php_flag[display_errors] = off php_flag[display_errors] = off"
This commit is contained in:
@@ -3,6 +3,10 @@
|
|||||||
# Disable Strict Host checking for non interactive git clones
|
# Disable Strict Host checking for non interactive git clones
|
||||||
|
|
||||||
mkdir -p -m 0700 /root/.ssh
|
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
|
echo -e "Host *\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config
|
||||||
|
|
||||||
if [[ "$GIT_USE_SSH" == "1" ]] ; then
|
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
|
cp /var/www/html/conf/nginx/nginx-site-ssl.conf /etc/nginx/sites-available/default-ssl.conf
|
||||||
fi
|
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
|
# Display PHP error's or not
|
||||||
if [[ "$ERRORS" != "1" ]] ; then
|
if [[ "$ERRORS" != "1" ]] ; then
|
||||||
echo php_flag[display_errors] = off >> /usr/local/etc/php-fpm.conf
|
echo php_flag[display_errors] = off >> /usr/local/etc/php-fpm.conf
|
||||||
|
|||||||
Reference in New Issue
Block a user