From 8c0155e64bbf163712fbe49305cd06879ce71ce4 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Sep 2023 15:00:34 -0400 Subject: [PATCH] Update homarr.sh modify git update --- ct/homarr.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ct/homarr.sh b/ct/homarr.sh index 514d49c0..3816ca6d 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -58,22 +58,22 @@ systemctl stop homarr cd /opt/homarr output=$(git pull 2>&1) if echo "$output" | grep -q "Already up to date." -then - msg_ok "$APP is already up to date." - systemctl start homarr -else - if ! git pull; then - echo "Update failed, temporarily storing changes and trying again." - git stash && git pull || ( + then + msg_ok "$APP is already up to date." + systemctl start homarr + else + if ! git pull; then + echo "Update failed, temporarily storing changes and trying again." + git stash && git pull || ( echo "Update failed even after storing changes. Aborting." exit 1 ) - fi + yarn install &>/dev/null + yarn build &>/dev/null + systemctl start homarr + msg_ok "Updated $APP" + fi fi -yarn install &>/dev/null -yarn build &>/dev/null -systemctl start homarr -msg_ok "Updated $APP" exit }