From 8c4310d85e06970fdfe4003ce144e73fcd870fb8 Mon Sep 17 00:00:00 2001 From: lgromero Date: Wed, 13 Nov 2024 16:16:47 +0100 Subject: [PATCH] refs #1134 Fix bug that in installer creates oglive_info.json with root --- bin/oglivecli | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/oglivecli b/bin/oglivecli index 979362c..039447f 100755 --- a/bin/oglivecli +++ b/bin/oglivecli @@ -346,7 +346,7 @@ function install() { find -L "$OGLIVEDIR" -type d -exec chmod 755 {} \; >/dev/null 2>&1 || { echo "{\"error\": \"CHMOD_FAILED\", \"message\": \"Failed to change permissions for directories in $OGLIVEDIR.\"}"; exit 500; } find -L "$OGLIVEDIR" -type f -exec chmod 644 {} \; >/dev/null 2>&1 || { echo "{\"error\": \"CHMOD_FAILED\", \"message\": \"Failed to change permissions for files in $OGLIVEDIR.\"}"; exit 500; } - sudo chown -R :opengnsys "$OGLIVEDIR" >/dev/null 2>&1 || { echo "{\"error\": \"CHOWN_FAILED\", \"message\": \"Failed to change ownership for $OGLIVEDIR.\"}"; exit 500; } + OGSQFS="$OGLIVEDIR/ogclient.sqfs" trap "exit 0" SIGINT @@ -383,7 +383,7 @@ function install() { }' > "$OGLIVEDIR/oglive_info.json" [ ! -f "$OGLIVEDIR/oglive_info.json" ] && { echo "{\"error\": \"JSON_CREATION_FAILED\", \"message\": \"Failed to create oglive_info.json.\"}"; exit 500; } - + sudo chown -R :opengnsys "$OGLIVEDIR" >/dev/null 2>&1 || { echo "{\"error\": \"CHOWN_FAILED\", \"message\": \"Failed to change ownership for $OGLIVEDIR.\"}"; exit 500; } JSON_OUTPUT=$(jq -n \ --arg id "$OGLIVEID" \ --arg dist "$OGLIVEDIST" \