diff --git a/ct/alpine-gitea.sh b/ct/alpine-gitea.sh index 235e696..8006a67 100644 --- a/ct/alpine-gitea.sh +++ b/ct/alpine-gitea.sh @@ -20,20 +20,34 @@ color catch_errors function update_script() { - header_info - msg_info "Updating Alpine Packages" - apk update - apk upgrade - msg_ok "Updated Alpine Packages" - - msg_info "Updating Gitea" - apk upgrade gitea - msg_ok "Updated Gitea" - - msg_info "Restarting Gitea" - rc-service gitea restart - msg_ok "Restarted Gitea" - exit 0 + if ! apk -e info newt >/dev/null 2>&1; then + apk add -q newt + fi + while true; do + CHOICE=$( + whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 2 \ + "1" "Update Alpine" \ + "2" "Update Gitea" 3>&2 2>&1 1>&3 + ) + exit_status=$? + if [ $exit_status == 1 ]; then + clear + exit-script + fi + header_info + case $CHOICE in + 1) + apk update && apk upgrade + exit + ;; + 2) + apk update && apk upgrade + apk upgrade gitea + rc-service gitea restart + exit + ;; + esac + done } start