Replace init_error_traps with catch_errors in scripts
Some checks failed
Bump build.func Revision / bump-revision (push) Has been cancelled

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:
CanbiZ 2025-09-19 08:53:49 +02:00
parent fe3de07157
commit b840a8aa32
107 changed files with 497 additions and 498 deletions

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -19,7 +19,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -18,7 +18,7 @@ header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -18,7 +18,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="1"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -19,7 +19,7 @@ var_tun="${var_tun:-yes}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="1"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -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"

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -16,7 +16,7 @@ var_version="${var_version:-12}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -16,7 +16,7 @@ var_unprivileged="${var_unprivileged:-1}"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -18,7 +18,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -18,7 +18,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-0}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -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() {

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -16,7 +16,7 @@ var_version="${var_version:-13}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -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 \

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -18,7 +18,7 @@ var_fuse="${var_fuse:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -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

View File

@ -19,7 +19,7 @@ var_unprivileged="${var_unprivileged:-0}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -14,7 +14,7 @@ header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -22,7 +22,7 @@ base_settings
# Core
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
init_error_traps
catch_errors
function update_script() {
header_info

View File

@ -8,14 +8,14 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Caddy"
$STD apk add --no-cache caddy caddy-openrc
cat<<EOF >/etc/caddy/Caddyfile
cat <<EOF >/etc/caddy/Caddyfile
:80 {
# Set this path to your site's directory.
root * /var/www/html
@ -31,7 +31,7 @@ cat<<EOF >/etc/caddy/Caddyfile
}
EOF
mkdir -p /var/www/html
cat<<EOF >/var/www/html/index.html
cat <<EOF >/var/www/html/index.html
<!DOCTYPE html>
<html>
<head>

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -9,7 +9,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -9,7 +9,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -9,7 +9,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -9,7 +9,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -10,7 +10,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@ source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -7,7 +7,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -7,7 +7,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -12,7 +12,7 @@ INSTALL_PATH="/opt/sng_freepbx_debian_install.sh"
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -9,7 +9,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -7,7 +7,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -7,7 +7,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -9,7 +9,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

View File

@ -8,7 +8,7 @@
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
init_error_traps
catch_errors
setting_up_container
network_check
update_os

Some files were not shown because too many files have changed in this diff Show More