Compare commits
No commits in common. "5161a371edad1d926a5f9e58d5433e9aae390e98" and "c3420494dd60d43af61b0005ef3d5b642452801c" have entirely different histories.
5161a371ed
...
c3420494dd
@ -4,12 +4,6 @@
|
|||||||
# Co-Author: michelroegl-brunner
|
# Co-Author: michelroegl-brunner
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||||
|
|
||||||
set -Eeuo pipefail
|
|
||||||
|
|
||||||
trap '__handle_general_error "${BASH_SOURCE[0]}:${LINENO}"' ERR
|
|
||||||
trap '__handle_signal_exit' SIGINT SIGTERM
|
|
||||||
trap '__handle_exit' EXIT
|
|
||||||
|
|
||||||
variables() {
|
variables() {
|
||||||
NSAPP=$(echo "${APP,,}" | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces.
|
NSAPP=$(echo "${APP,,}" | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces.
|
||||||
var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP.
|
var_install="${NSAPP}-install" # sets the var_install variable by appending "-install" to the value of NSAPP.
|
||||||
@ -1082,7 +1076,7 @@ EOF'
|
|||||||
pct exec "$CTID" -- bash -c "apt-get update >/dev/null && apt-get install -y sudo curl mc gnupg2 >/dev/null"
|
pct exec "$CTID" -- bash -c "apt-get update >/dev/null && apt-get install -y sudo curl mc gnupg2 >/dev/null"
|
||||||
fi
|
fi
|
||||||
msg_ok "Customized LXC Container"
|
msg_ok "Customized LXC Container"
|
||||||
run_container_safe "curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/install/$var_install.sh"
|
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/install/$var_install.sh)" $?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,14 +439,3 @@ msg_progress() {
|
|||||||
printf "\n" >&2
|
printf "\n" >&2
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
run_container_safe() {
|
|
||||||
local ct="$1"
|
|
||||||
shift
|
|
||||||
local cmd="$*"
|
|
||||||
|
|
||||||
lxc-attach -n "$ct" -- bash -euo pipefail -c "
|
|
||||||
trap 'echo Aborted in container; exit 130' SIGINT SIGTERM
|
|
||||||
$cmd
|
|
||||||
" || __handle_general_error "lxc-attach to CT $ct"
|
|
||||||
}
|
|
||||||
|
@ -13,18 +13,6 @@ fi
|
|||||||
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func)
|
source <(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/core.func)
|
||||||
load_functions
|
load_functions
|
||||||
|
|
||||||
__handle_general_error() {
|
|
||||||
local location="$1"
|
|
||||||
local code="$?"
|
|
||||||
msg_error "Error at ${location} (exit code ${code})"
|
|
||||||
exit "$code"
|
|
||||||
}
|
|
||||||
|
|
||||||
__handle_signal_exit() {
|
|
||||||
msg_error "Script aborted by signal (SIGINT or SIGTERM)"
|
|
||||||
exit 130
|
|
||||||
}
|
|
||||||
|
|
||||||
# # 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user