From 21ab560671d2bc3dc9f2918d08aa2eaf010c2b7e Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Tue, 6 Feb 2024 20:38:41 -0800 Subject: [PATCH] install: fix disk setup script user account --- install/docker/setup-scrypted-nvr-volume.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/install/docker/setup-scrypted-nvr-volume.sh b/install/docker/setup-scrypted-nvr-volume.sh index abfd887d8..d8b2e1497 100644 --- a/install/docker/setup-scrypted-nvr-volume.sh +++ b/install/docker/setup-scrypted-nvr-volume.sh @@ -59,12 +59,12 @@ then fi function stopscrypted() { - cd "$SCRYPTED_HOME" + cd $SCRYPTED_HOME echo "" echo "Stopping the Scrypted container. If there are any errors during disk setup, Scrypted will need to be manually restarted with:" echo "cd $SCRYPTED_HOME && docker compose up -d" echo "" - docker compose down + sudo -u $SERVICE_USER docker compose down 2> /dev/null } function removescryptedfstab() { @@ -143,4 +143,5 @@ sed -i s/'^.*:\/nvr'/" - $ESCAPED_DIR:\/nvr"/ "$DOCKER_COMPOSE_YML" sed -i s/'^.*SCRYPTED_NVR_VOLUME.*$'/" - SCRYPTED_NVR_VOLUME=\/nvr"/ "$DOCKER_COMPOSE_YML" set +e -cd "$SCRYPTED_HOME" && docker compose up -d +cd $SCRYPTED_HOME +sudo -u $SERVICE_USER docker compose up -d