Update alpine-gitea.sh

This commit is contained in:
CanbiZ 2025-03-26 16:31:58 +01:00
parent bfecf04ffd
commit 0c7678bc79

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG # Copyright (c) 2021-2025 community-scripts ORG
# Author: MickLesk (CanbiZ) # Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
@ -20,34 +20,24 @@ color
catch_errors catch_errors
function update_script() { function update_script() {
if ! apk -e info newt >/dev/null 2>&1; then header_info
apk add -q newt check_container_storage
fi check_container_resources
while true; do
CHOICE=$( msg_info "Updating Alpine Packages"
whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 2 \ apk update
"1" "Update Alpine" \ apk upgrade
"2" "Update Gitea" 3>&2 2>&1 1>&3 msg_ok "Updated Alpine Packages"
)
exit_status=$? msg_info "Updating Gitea"
if [ $exit_status == 1 ]; then apk upgrade gitea
clear msg_ok "Updated Gitea"
exit-script
fi msg_info "Restarting Gitea"
header_info rc-service gitea restart
case $CHOICE in msg_ok "Restarted Gitea"
1)
apk update && apk upgrade exit 0
exit
;;
2)
apk update && apk upgrade
apk upgrade gitea
rc-service gitea restart
exit
;;
esac
done
} }
start start