mirror of
https://github.com/tteck/Proxmox.git
synced 2024-11-22 08:13:11 +01:00
Update homarr.sh
modify git update
This commit is contained in:
parent
ab394e04ab
commit
e48b2bd0df
14
ct/homarr.sh
14
ct/homarr.sh
@ -56,13 +56,19 @@ 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)
|
output=$(git pull 2>&1)
|
||||||
git pull &>/dev/null
|
|
||||||
if echo "$output" | grep -q "Already up to date."
|
if echo "$output" | grep -q "Already up to date."
|
||||||
then
|
then
|
||||||
msg_ok " $APP is already up to date."
|
msg_ok "$APP is already up to date."
|
||||||
systemctl start homarr
|
systemctl start homarr
|
||||||
exit
|
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
|
||||||
fi
|
fi
|
||||||
yarn install &>/dev/null
|
yarn install &>/dev/null
|
||||||
yarn build &>/dev/null
|
yarn build &>/dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user