mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-02 06:45:07 +02:00
Compare commits
1 Commits
feat/updat
...
fix/alpine
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0389ffd3b2 |
@@ -21,8 +21,6 @@ catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -f /usr/local/bin/ironclaw ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
|
||||
@@ -22,8 +22,6 @@ catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /etc/ntfy ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
|
||||
@@ -21,7 +21,6 @@ catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/redlib ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
|
||||
@@ -21,8 +21,6 @@ catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if ! apk info -e rustypaste >/dev/null 2>&1; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
|
||||
@@ -3504,52 +3504,6 @@ msg_menu() {
|
||||
return 0
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# run_addon_updates()
|
||||
#
|
||||
# - Scans /usr/local/bin/update_* for addon update scripts installed alongside
|
||||
# the main application (e.g. by tools/addon/*.sh)
|
||||
# - For each found addon, prompts the user (60s timeout, default no) whether
|
||||
# it should be updated as well
|
||||
# - Skipped entirely when PHS_SILENT=1 to keep unattended updates predictable
|
||||
# ------------------------------------------------------------------------------
|
||||
run_addon_updates() {
|
||||
shopt -s nullglob
|
||||
local addons=(/usr/local/bin/update_*)
|
||||
shopt -u nullglob
|
||||
|
||||
((${#addons[@]} == 0)) && return 0
|
||||
|
||||
if [[ "${PHS_SILENT:-0}" == "1" ]]; then
|
||||
msg_info "Detected ${#addons[@]} addon update script(s) - skipping (PHS_SILENT)"
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo
|
||||
echo -e "${INFO}${YW} Detected installed addon update script(s):${CL}"
|
||||
local a name
|
||||
for a in "${addons[@]}"; do
|
||||
echo -e "${TAB}- ${a##*/update_}"
|
||||
done
|
||||
echo
|
||||
|
||||
local ans
|
||||
for a in "${addons[@]}"; do
|
||||
name="${a##*/update_}"
|
||||
printf 'Do you also want to update addon "%s"? (y/N) [60s]: ' "$name"
|
||||
ans=""
|
||||
if read -r -t 60 ans; then :; else echo; fi
|
||||
case "${ans,,}" in
|
||||
y | yes)
|
||||
bash "$a" || msg_warn "Addon update for $name failed (rc=$?)"
|
||||
;;
|
||||
*)
|
||||
msg_info "Skipped addon: $name"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# start()
|
||||
#
|
||||
@@ -3569,7 +3523,6 @@ start() {
|
||||
ensure_profile_loaded
|
||||
get_lxc_ip
|
||||
update_script
|
||||
run_addon_updates
|
||||
update_motd_ip
|
||||
cleanup_lxc
|
||||
else
|
||||
@@ -3598,7 +3551,6 @@ start() {
|
||||
ensure_profile_loaded
|
||||
get_lxc_ip
|
||||
update_script
|
||||
run_addon_updates
|
||||
update_motd_ip
|
||||
cleanup_lxc
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user