From 395e522430957704fbaf0b014b2996e5baabfc7f Mon Sep 17 00:00:00 2001 From: Vincent <114195376+HydroshieldMKII@users.noreply.github.com> Date: Tue, 21 Oct 2025 15:28:57 -0400 Subject: [PATCH] Added validation before copying file and fix build command error (#8553) --- ct/guardian.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ct/guardian.sh b/ct/guardian.sh index cee37503e..60f4a4ea3 100755 --- a/ct/guardian.sh +++ b/ct/guardian.sh @@ -40,9 +40,9 @@ if check_for_gh_release "guardian" "HydroshieldMKII/Guardian" ; then msg_ok "Backed up Database" fi - cp /opt/guardian/.env /opt + [[ -f "/opt/guardian/.env" ]] && cp "/opt/guardian/.env" "/opt" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "guardian" "HydroshieldMKII/Guardian" "tarball" "latest" "/opt/guardian" - mv /opt/.env /opt/guardian + [[ -f "/opt/.env" ]] && mv "/opt/.env" "/opt/guardian" if [[ -f "/tmp/plex-guard.db.backup" ]] ; then msg_info "Restoring Database" @@ -58,7 +58,8 @@ if check_for_gh_release "guardian" "HydroshieldMKII/Guardian" ; then cd /opt/guardian/frontend $STD npm ci - $STD DEPLOYMENT_MODE=standalone npm run build + export DEPLOYMENT_MODE=standalone + $STD npm run build msg_ok "Updated Guardian" msg_info "Starting Services"