short_test
This commit is contained in:
parent
65ae8d540f
commit
cb33ea26df
@ -25,9 +25,6 @@ function update_script() {
|
|||||||
$STD apk update && apk upgrade
|
$STD apk update && apk upgrade
|
||||||
msg_ok "Updated Alpine Packages"
|
msg_ok "Updated Alpine Packages"
|
||||||
|
|
||||||
echo "DEBUG: CT_TYPE before update_script=${CT_TYPE:-UNDEFINED}"
|
|
||||||
echo "DEBUG: var_unprivileged=${var_unprivileged:-UNDEFINED}"
|
|
||||||
|
|
||||||
msg_info "Updating Gitea"
|
msg_info "Updating Gitea"
|
||||||
$STD apk upgrade gitea
|
$STD apk upgrade gitea
|
||||||
msg_ok "Updated Gitea"
|
msg_ok "Updated Gitea"
|
||||||
|
@ -19,6 +19,18 @@ variables
|
|||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
|
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \
|
||||||
|
"1" "Check for Alpine Updates" ON \
|
||||||
|
3>&1 1>&2 2>&3)
|
||||||
|
|
||||||
|
header_info
|
||||||
|
if [ "$UPD" == "1" ]; then
|
||||||
|
apk update && apk upgrade
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
}
|
||||||
function update_script() {
|
function update_script() {
|
||||||
msg_info "Updating Alpine Packages"
|
msg_info "Updating Alpine Packages"
|
||||||
apk update && apk upgrade
|
apk update && apk upgrade
|
||||||
|
@ -1356,47 +1356,22 @@ check_container_storage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
LOGDIR="/usr/local/community-scripts/logs"
|
|
||||||
mkdir -p "$LOGDIR"
|
|
||||||
if [ -f /etc/alpine-release ]; then
|
|
||||||
echo "Running on Alpine Linux – minimal update process."
|
|
||||||
update_script
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
if command -v pveversion >/dev/null 2>&1; then
|
if command -v pveversion >/dev/null 2>&1; then
|
||||||
if ! (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then
|
if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC" --yesno "This will create a New ${APP} LXC. Proceed?" 10 58); then
|
||||||
clear
|
clear
|
||||||
exit_script
|
echo -e "⚠ User exited script \n"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
SPINNER_PID=""
|
||||||
install_script
|
install_script
|
||||||
else
|
fi
|
||||||
CHOICE=$(whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --title "${APP} LXC Update/Setting" --menu \
|
|
||||||
"Support/Update functions for ${APP} LXC. Choose an option:" \
|
|
||||||
12 60 3 \
|
|
||||||
"1" "YES (Silent Mode)" \
|
|
||||||
"2" "YES (Verbose Mode)" \
|
|
||||||
"3" "NO (Cancel Update)" --nocancel --default-item "1" 3>&1 1>&2 2>&3)
|
|
||||||
|
|
||||||
case "$CHOICE" in
|
if ! command -v pveversion >/dev/null 2>&1; then
|
||||||
1)
|
if ! (whiptail --backtitle "Proxmox VE Helper Scripts" --title "${APP} LXC UPDATE" --yesno "Support/Update functions for ${APP} LXC. Proceed?" 10 58); then
|
||||||
VERB="no"
|
|
||||||
set_std_mode
|
|
||||||
log_message "INFO" "Update started (Silent Mode)"
|
|
||||||
;;
|
|
||||||
2)
|
|
||||||
VERB="yes"
|
|
||||||
set_std_mode
|
|
||||||
log_message "INFO" "Update started (Verbose Mode)"
|
|
||||||
;;
|
|
||||||
3)
|
|
||||||
clear
|
clear
|
||||||
log_message "INFO" "Update aborted."
|
echo -e "⚠ User exited script \n"
|
||||||
exit_script
|
|
||||||
exit
|
exit
|
||||||
;;
|
fi
|
||||||
esac
|
|
||||||
|
|
||||||
SPINNER_PID=""
|
SPINNER_PID=""
|
||||||
update_script
|
update_script
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user