Skip to content

Commit 90c4e0a

Browse files
committed
Remove "sleep 10" on non-empty directory
This sleep is a little silly -- if someone is mounting an existing directory to the WordPress image, they really can't expect us to not touch it (what's the point, otherwise).
1 parent 3fc7967 commit 90c4e0a

File tree

13 files changed

+26
-39
lines changed

13 files changed

+26
-39
lines changed

docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4242

4343
if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
4444
echo >&2 "WordPress not found in $PWD - copying now..."
45-
if [ "$(ls -A)" ]; then
46-
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47-
( set -x; ls -A; sleep 10 )
45+
if [ -n "$(ls -A)" ]; then
46+
echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
4847
fi
4948
tar --create \
5049
--file - \

php5.6/apache/docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4242

4343
if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
4444
echo >&2 "WordPress not found in $PWD - copying now..."
45-
if [ "$(ls -A)" ]; then
46-
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47-
( set -x; ls -A; sleep 10 )
45+
if [ -n "$(ls -A)" ]; then
46+
echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
4847
fi
4948
tar --create \
5049
--file - \

php5.6/fpm-alpine/docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4242

4343
if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
4444
echo >&2 "WordPress not found in $PWD - copying now..."
45-
if [ "$(ls -A)" ]; then
46-
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47-
( set -x; ls -A; sleep 10 )
45+
if [ -n "$(ls -A)" ]; then
46+
echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
4847
fi
4948
tar --create \
5049
--file - \

php5.6/fpm/docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4242

4343
if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
4444
echo >&2 "WordPress not found in $PWD - copying now..."
45-
if [ "$(ls -A)" ]; then
46-
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47-
( set -x; ls -A; sleep 10 )
45+
if [ -n "$(ls -A)" ]; then
46+
echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
4847
fi
4948
tar --create \
5049
--file - \

php7.0/apache/docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4242

4343
if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
4444
echo >&2 "WordPress not found in $PWD - copying now..."
45-
if [ "$(ls -A)" ]; then
46-
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47-
( set -x; ls -A; sleep 10 )
45+
if [ -n "$(ls -A)" ]; then
46+
echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
4847
fi
4948
tar --create \
5049
--file - \

php7.0/fpm-alpine/docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4242

4343
if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
4444
echo >&2 "WordPress not found in $PWD - copying now..."
45-
if [ "$(ls -A)" ]; then
46-
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47-
( set -x; ls -A; sleep 10 )
45+
if [ -n "$(ls -A)" ]; then
46+
echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
4847
fi
4948
tar --create \
5049
--file - \

php7.0/fpm/docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4242

4343
if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
4444
echo >&2 "WordPress not found in $PWD - copying now..."
45-
if [ "$(ls -A)" ]; then
46-
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47-
( set -x; ls -A; sleep 10 )
45+
if [ -n "$(ls -A)" ]; then
46+
echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
4847
fi
4948
tar --create \
5049
--file - \

php7.1/apache/docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4242

4343
if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
4444
echo >&2 "WordPress not found in $PWD - copying now..."
45-
if [ "$(ls -A)" ]; then
46-
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47-
( set -x; ls -A; sleep 10 )
45+
if [ -n "$(ls -A)" ]; then
46+
echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
4847
fi
4948
tar --create \
5049
--file - \

php7.1/fpm-alpine/docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4242

4343
if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
4444
echo >&2 "WordPress not found in $PWD - copying now..."
45-
if [ "$(ls -A)" ]; then
46-
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47-
( set -x; ls -A; sleep 10 )
45+
if [ -n "$(ls -A)" ]; then
46+
echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
4847
fi
4948
tar --create \
5049
--file - \

php7.1/fpm/docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4242

4343
if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
4444
echo >&2 "WordPress not found in $PWD - copying now..."
45-
if [ "$(ls -A)" ]; then
46-
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47-
( set -x; ls -A; sleep 10 )
45+
if [ -n "$(ls -A)" ]; then
46+
echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
4847
fi
4948
tar --create \
5049
--file - \

php7.2/apache/docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4242

4343
if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
4444
echo >&2 "WordPress not found in $PWD - copying now..."
45-
if [ "$(ls -A)" ]; then
46-
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47-
( set -x; ls -A; sleep 10 )
45+
if [ -n "$(ls -A)" ]; then
46+
echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
4847
fi
4948
tar --create \
5049
--file - \

php7.2/fpm-alpine/docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4242

4343
if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
4444
echo >&2 "WordPress not found in $PWD - copying now..."
45-
if [ "$(ls -A)" ]; then
46-
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47-
( set -x; ls -A; sleep 10 )
45+
if [ -n "$(ls -A)" ]; then
46+
echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
4847
fi
4948
tar --create \
5049
--file - \

php7.2/fpm/docker-entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
4242

4343
if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
4444
echo >&2 "WordPress not found in $PWD - copying now..."
45-
if [ "$(ls -A)" ]; then
46-
echo >&2 "WARNING: $PWD is not empty - press Ctrl+C now if this is an error!"
47-
( set -x; ls -A; sleep 10 )
45+
if [ -n "$(ls -A)" ]; then
46+
echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
4847
fi
4948
tar --create \
5049
--file - \

0 commit comments

Comments
 (0)