For testing

This commit is contained in:
knightfall
2025-10-10 21:25:33 +11:00
parent c559ba7f05
commit 0c43526713
35 changed files with 84 additions and 76 deletions
+11 -11
View File
@@ -15,13 +15,13 @@ variables() {
CT_TYPE=${var_unprivileged:-$CT_TYPE}
}
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
source <(curl -fsSL https://raw.githubusercontent.com/knightfall/ProxmoxVE/refs/heads/unifi-sh-fix/misc/api.func)
if command -v curl >/dev/null 2>&1; then
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
source <(curl -fsSL https://raw.githubusercontent.com/knightfall/ProxmoxVE/refs/heads/unifi-sh-fix/misc/core.func)
load_functions
elif command -v wget >/dev/null 2>&1; then
source <(wget -qO- https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
source <(wget -qO- https://raw.githubusercontent.com/knightfall/ProxmoxVE/refs/heads/unifi-sh-fix/misc/core.func)
load_functions
fi
# This function enables error handling in the script by setting options and defining a trap for the ERR signal.
@@ -32,7 +32,7 @@ catch_errors() {
# This function is called when an error occurs. It receives the exit code, line number, and command that caused the error, and displays an error message.
error_handler() {
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
source /dev/stdin <<<$(curl -fsSL https://raw.githubusercontent.com/knightfall/ProxmoxVE/refs/heads/unifi-sh-fix/misc/api.func)
printf "\e[?25h"
local exit_code="$?"
local line_number="$1"
@@ -980,7 +980,7 @@ install_script() {
header_info
echo -e "${INFO}${HOLD} ${GN}Using Config File on node $PVEHOST_NAME${CL}"
METHOD="config_file"
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/config-file.func)
source <(curl -fsSL https://raw.githubusercontent.com/knightfall/ProxmoxVE/refs/heads/unifi-sh-fix/misc/config-file.func)
config_file
break
;;
@@ -1051,7 +1051,7 @@ check_container_storage() {
}
start() {
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
source <(curl -fsSL https://raw.githubusercontent.com/knightfall/ProxmoxVE/refs/heads/unifi-sh-fix/misc/tools.func)
if command -v pveversion >/dev/null 2>&1; then
install_script
else
@@ -1112,9 +1112,9 @@ build_container() {
TEMP_DIR=$(mktemp -d)
pushd "$TEMP_DIR" >/dev/null
if [ "$var_os" == "alpine" ]; then
export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/alpine-install.func)"
export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/knightfall/ProxmoxVE/refs/heads/unifi-sh-fix/misc/alpine-install.func)"
else
export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/install.func)"
export FUNCTIONS_FILE_PATH="$(curl -fsSL https://raw.githubusercontent.com/knightfall/ProxmoxVE/refs/heads/unifi-sh-fix/misc/install.func)"
fi
export DIAGNOSTICS="$DIAGNOSTICS"
@@ -1149,7 +1149,7 @@ build_container() {
$PW
"
# This executes create_lxc.sh and creates the container and .conf file
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/create_lxc.sh)" $?
bash -c "$(curl -fsSL https://raw.githubusercontent.com/knightfall/ProxmoxVE/refs/heads/unifi-sh-fix/misc/create_lxc.sh)" $?
LXC_CONFIG="/etc/pve/lxc/${CTID}.conf"
@@ -1342,7 +1342,7 @@ EOF'
fi
msg_ok "Customized LXC Container"
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/${var_install}.sh)"
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/knightfall/ProxmoxVE/refs/heads/unifi-sh-fix/install/"${var_install}".sh)"
}
# This function sets the description of the container.
@@ -1354,7 +1354,7 @@ description() {
cat <<EOF
<div align='center'>
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
<img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
<img src='https://raw.githubusercontent.com/knightfall/ProxmoxVE/refs/heads/unifi-sh-fix/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
</a>
<h2 style='font-size: 24px; margin: 20px 0;'>${APP} LXC</h2>