This commit is contained in:
CanbiZ 2025-05-09 15:19:32 +02:00
parent 7e8dd9deb6
commit 0028578712
3 changed files with 25 additions and 25 deletions

View File

@ -10,19 +10,19 @@ fi
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func) source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func)
load_functions load_functions
# Function to set STD mode based on verbosity # # Function to set STD mode based on verbosity
set_std_mode() { # set_std_mode() {
if [ "$VERBOSE" = "yes" ]; then # if [ "$VERBOSE" = "yes" ]; then
STD="" # STD=""
else # else
STD="silent" # STD="silent"
fi # fi
} # }
# Silent execution function # # Silent execution function
silent() { # silent() {
"$@" >/dev/null 2>&1 # "$@" >/dev/null 2>&1
} # }
# This function enables IPv6 if it's not disabled and sets verbose mode # This function enables IPv6 if it's not disabled and sets verbose mode
verb_ip6() { verb_ip6() {

View File

@ -21,6 +21,7 @@ load_functions() {
formatting formatting
icons icons
default_vars default_vars
set_std_mode
# add more # add more
} }
@ -90,7 +91,6 @@ default_vars() {
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Sets default verbose mode for script execution. # Sets default verbose mode for script execution.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
VERBOSE="${1:-no}"
VERB=${var_verbose:-$VERBOSE} VERB=${var_verbose:-$VERBOSE}
set_std_mode() { set_std_mode() {
if [ "$VERB" = "yes" ]; then if [ "$VERB" = "yes" ]; then

View File

@ -13,19 +13,19 @@ fi
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func) source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/core.func)
load_functions load_functions
# Function to set STD mode based on verbosity # # Function to set STD mode based on verbosity
set_std_mode() { # set_std_mode() {
if [ "$VERBOSE" = "yes" ]; then # if [ "$VERBOSE" = "yes" ]; then
STD="" # STD=""
else # else
STD="silent" # STD="silent"
fi # fi
} # }
# Silent execution function # # Silent execution function
silent() { # silent() {
"$@" >/dev/null 2>&1 # "$@" >/dev/null 2>&1
} # }
# This function enables IPv6 if it's not disabled and sets verbose mode # This function enables IPv6 if it's not disabled and sets verbose mode
verb_ip6() { verb_ip6() {