mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-15 17:53:25 +01:00
Add phs_whiptail() wrapper function to build.func that transparently handles whiptail dialogs in unattended/silent mode (PHS_SILENT=1): - radiolist: auto-selects the ON (default) option - menu: auto-selects the first option (typically 'Update') - yesno: auto-confirms (returns 0) - msgbox: auto-acknowledges (returns 0) - passwordbox/inputbox: signals skip (returns 1) Replace all whiptail calls in update_script() functions across 19 ct scripts with phs_whiptail for unattended compatibility. Affected scripts: - alpine-docker, alpine-grafana, alpine-loki, alpine-nextcloud - alpine-redis, alpine-valkey, alpine-vaultwarden, alpine-zigbee2mqtt - alpine, cronicle, gitea-mirror, homeassistant - loki, meilisearch, node-red, npmplus - plex, podman-homeassistant, vaultwarden Also improve update-apps.sh batch updater: - Exit code 75 (EX_TEMPFAIL) = disabled/skipped, not a failure - In unattended mode, failed containers are skipped instead of aborting the entire update loop - Update nginxproxymanager.sh to use exit 75 for disabled state Closes #11620
42 lines
1018 B
Bash
42 lines
1018 B
Bash
#!/usr/bin/env bash
|
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
# Copyright (c) 2021-2026 tteck
|
|
# Author: tteck (tteckster)
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
# Source: https://alpinelinux.org/
|
|
|
|
APP="Alpine"
|
|
var_tags="${var_tags:-os;alpine}"
|
|
var_cpu="${var_cpu:-1}"
|
|
var_ram="${var_ram:-512}"
|
|
var_disk="${var_disk:-1}"
|
|
var_os="${var_os:-alpine}"
|
|
var_version="${var_version:-3.23}"
|
|
var_unprivileged="${var_unprivileged:-1}"
|
|
|
|
header_info "$APP"
|
|
variables
|
|
color
|
|
catch_errors
|
|
|
|
function update_script() {
|
|
UPD=$(
|
|
phs_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
|
|
$STD apk -U upgrade
|
|
msg_ok "Updated successfully!"
|
|
exit 0
|
|
fi
|
|
}
|
|
|
|
start
|
|
build_container
|
|
description
|
|
|
|
msg_ok "Completed successfully!\n"
|