Update homarr.sh

redo update
fixes https://github.com/tteck/Proxmox/issues/1774
pull/1851/head
tteckster 1 year ago committed by GitHub
parent 8c0155e64b
commit e52b7872d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -56,24 +56,15 @@ if [[ ! -d /opt/homarr ]]; then msg_error "No ${APP} Installation Found!"; exit;
msg_info "Updating $APP" msg_info "Updating $APP"
systemctl stop homarr systemctl stop homarr
cd /opt/homarr cd /opt/homarr
output=$(git pull 2>&1) cp -R data data-backup
if echo "$output" | grep -q "Already up to date." git stash &>/dev/null
then git pull &>/dev/null
msg_ok "$APP is already up to date." yarn install &>/dev/null
systemctl start homarr yarn build &>/dev/null
else cp -R data-backup/* data
if ! git pull; then rm -rf data-backup
echo "Update failed, temporarily storing changes and trying again." systemctl start homarr
git stash && git pull || ( msg_ok "Updated $APP"
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
exit exit
} }

Loading…
Cancel
Save

Powered by BW's shoe-string budget.