mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-26 00:55:54 +00:00
Replace init_error_traps with catch_errors in scripts
Replaces all occurrences of the 'init_error_traps' function with 'catch_errors' across container and install scripts for consistency in error handling. Also adjusts indentation and formatting in some scripts for improved readability.
This commit is contained in:
@@ -17,24 +17,24 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /etc/caddy ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apk -U upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -d /etc/caddy ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apk -U upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
|
||||
msg_info "Restarting Caddy"
|
||||
rc-service caddy restart
|
||||
msg_ok "Restarted Caddy"
|
||||
exit
|
||||
msg_info "Restarting Caddy"
|
||||
rc-service caddy restart
|
||||
msg_ok "Restarted Caddy"
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -19,7 +19,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -18,7 +18,7 @@ header_info "$APP"
|
||||
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -18,7 +18,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="1"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -19,7 +19,7 @@ var_tun="${var_tun:-yes}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="1"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -26,7 +26,7 @@ var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-12}"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function default_settings() {
|
||||
CT_TYPE="1"
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -16,7 +16,7 @@ var_version="${var_version:-12}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -16,7 +16,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -18,7 +18,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -18,7 +18,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-0}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
# this only updates garmin-grafana, not influxdb or grafana, which are upgraded with apt
|
||||
function update_script() {
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -16,21 +16,21 @@ var_version="${var_version:-13}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /usr/sbin/globaleaks ]]; then
|
||||
msg_error "No ${APP} installation found!"
|
||||
exit
|
||||
fi
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
if [[ ! -f /usr/sbin/globaleaks ]]; then
|
||||
msg_error "No ${APP} installation found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
msg_info "Updating $APP LXC"
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
msg_ok "Updated $APP LXC"
|
||||
}
|
||||
|
||||
start
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "UPDATE MODE" --radiolist --cancel-button Exit-Script "Spacebar = Select" 14 60 2 \
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -18,7 +18,7 @@ var_fuse="${var_fuse:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
|
||||
@@ -19,7 +19,7 @@ var_unprivileged="${var_unprivileged:-0}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -14,7 +14,7 @@ header_info "$APP"
|
||||
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -22,7 +22,7 @@ base_settings
|
||||
# Core
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
@@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
init_error_traps
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
|
||||
Reference in New Issue
Block a user