From 3c79ba33bb966f76e2b9484ba974a924d8c39908 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Tue, 6 Nov 2018 18:26:24 +0100 Subject: [PATCH] Fixes #13 --- entrypoint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 0aafbdc3..e60971b0 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -170,10 +170,10 @@ printf "DONE\n" # USER SECURITY ############################################ printf "Changing /auth.conf ownership to nonrootuser with read only access..." -chown nonrootuser /auth.conf -exitOnError $? -chmod 400 /auth.conf -exitOnError $? +err=$(chown nonrootuser /auth.conf 2>&1) +if [ "$(echo "$err" | grep "Read-only file system")" = "" ]; then exitOnError $?; fi +err=$(chmod 400 /auth.conf 2>&1) +if [ "$(echo "$err" | grep "Read-only file system")" = "" ]; then exitOnError $?; fi printf "DONE\n" ############################################