Update homarr.sh

modify git update
This commit is contained in:
tteckster 2023-09-08 15:00:34 -04:00 committed by GitHub
parent e48b2bd0df
commit 8c0155e64b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}