From daccaad28c20027e8d311ec6ef49e3968a0aeb78 Mon Sep 17 00:00:00 2001 From: Glenn Date: Tue, 13 Aug 2024 17:19:42 +0200 Subject: [PATCH] fix: better detect not-installed status --- hooks/gx.before-starting.www.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hooks/gx.before-starting.www.sh b/hooks/gx.before-starting.www.sh index ca8a57b..091c9ba 100755 --- a/hooks/gx.before-starting.www.sh +++ b/hooks/gx.before-starting.www.sh @@ -18,11 +18,10 @@ cd "$WORKDIR" || exit 1 echo "GX:BEFORE-STARTING:START ($(pwd))" # find . -maxdepth 1 echo "GX:BEFORE-STARTING:STATUS" - php -d memory_limit=-1 occ status |jq -r '.installed' -INSTALLED="$(php -d memory_limit=-1 occ status |jq -r '.installed')" -if [ "$INSTALLED" != "true" ]; then - echo "WARNING: Not installed yet. Exiting." +# INSTALLED="$(php -d memory_limit=-1 occ status |jq -r '.installed')" +if php -d memory_limit=-1 occ status 2>&1 | grep 'not installed' ; then + echo "WARNING: Nextcloud is not installed yet. Exiting." exit 0 fi