From d55e25a7e55c983745f88522a2de3101c6a05c7b Mon Sep 17 00:00:00 2001 From: William Miceli <1-WilliamMiceli@git.williammiceli.systems> Date: Sun, 9 Jun 2019 15:11:18 -0400 Subject: [PATCH] Fixed if check statement --- entrypoint.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index ae3e0a0..bb8404e 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,15 +2,15 @@ # Copy default "User" directory if none already exist echo "[ INFO ] Checking for any existing files" -if [ -z `/var/www/user/` ] +if [ -z `ls -A /var/www/user/` ] then - echo "No pre-existing files found (New instance)" - echo "Copying default files into the /var/www/user directory" + echo "[ INFO ] No pre-existing files found (New instance)" + echo "[ INFO ] Copying default files into the /var/www/user directory" tar xz -f USER.tar.gz -C / - echo "Default files have been copied successfully" + echo "[ INFO ] Default files have been copied successfully" else - echo "Pre-existing files found (Existing instance)" - echo "Not taking any action" + echo "[ INFO ] Pre-existing files found (Existing instance)" + echo "[ INFO ] Not taking any action" fi chown -R nginx:nginx /var/www