Update alpine-gitea.sh
This commit is contained in:
parent
6d3a08eaf8
commit
bfecf04ffd
@ -20,20 +20,34 @@ color
|
|||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
function update_script() {
|
function update_script() {
|
||||||
header_info
|
if ! apk -e info newt >/dev/null 2>&1; then
|
||||||
msg_info "Updating Alpine Packages"
|
apk add -q newt
|
||||||
apk update
|
fi
|
||||||
apk upgrade
|
while true; do
|
||||||
msg_ok "Updated Alpine Packages"
|
CHOICE=$(
|
||||||
|
whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --menu "Select option" 11 58 2 \
|
||||||
msg_info "Updating Gitea"
|
"1" "Update Alpine" \
|
||||||
apk upgrade gitea
|
"2" "Update Gitea" 3>&2 2>&1 1>&3
|
||||||
msg_ok "Updated Gitea"
|
)
|
||||||
|
exit_status=$?
|
||||||
msg_info "Restarting Gitea"
|
if [ $exit_status == 1 ]; then
|
||||||
rc-service gitea restart
|
clear
|
||||||
msg_ok "Restarted Gitea"
|
exit-script
|
||||||
exit 0
|
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
|
start
|
||||||
|
Loading…
x
Reference in New Issue
Block a user