From e52b7872d27b68d283abfc05a222dd7134528059 Mon Sep 17 00:00:00 2001 From: tteckster Date: Fri, 8 Sep 2023 21:43:08 -0400 Subject: [PATCH] Update homarr.sh redo update fixes https://github.com/tteck/Proxmox/issues/1774 --- ct/homarr.sh | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/ct/homarr.sh b/ct/homarr.sh index 3816ca6d..4f327ec7 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -56,24 +56,15 @@ if [[ ! -d /opt/homarr ]]; then msg_error "No ${APP} Installation Found!"; exit; msg_info "Updating $APP" 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 || ( - echo "Update failed even after storing changes. Aborting." - exit 1 - ) - yarn install &>/dev/null - yarn build &>/dev/null - systemctl start homarr - msg_ok "Updated $APP" - fi -fi +cp -R data data-backup +git stash &>/dev/null +git pull &>/dev/null +yarn install &>/dev/null +yarn build &>/dev/null +cp -R data-backup/* data +rm -rf data-backup +systemctl start homarr +msg_ok "Updated $APP" exit }