This commit is contained in:
2025-10-14 12:22:07 +02:00
parent aa97eea1b1
commit 24cd430cf4
2 changed files with 24 additions and 8 deletions

View File

@@ -15,13 +15,20 @@ variables() {
CT_TYPE=${var_unprivileged:-$CT_TYPE}
}
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
myuser=mhop
mybranch=mhop
#source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
#source <(curl -fsSL https://raw.githubusercontent.com/$myuser/ProxmoxVE/refs/heads/$mybranch/main/misc/api.func)
source <(curl -fsSL https://raw.githubusercontent.com/$myuser/ProxmoxVE/$mybranch/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/community-scripts/ProxmoxVE/main/misc/core.func)
source <(curl -fsSL https://raw.githubusercontent.com/$myuser/ProxmoxVE/$mybranch/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/community-scripts/ProxmoxVE/main/misc/core.func)
source <(curl -fsSL https://raw.githubusercontent.com/$myuser/ProxmoxVE/$mybranch/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.
@@ -981,6 +988,7 @@ install_script() {
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/$myuser/ProxmoxVE/$mybranch/misc/config-file.func)
config_file
break
;;
@@ -1052,6 +1060,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/$myuser/ProxmoxVE/$mybranch/misc/tools.func)
if command -v pveversion >/dev/null 2>&1; then
install_script
else
@@ -1343,7 +1352,7 @@ EOF'
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/mhop/ProxmoxVE/refs/head/mhop/install/${var_install}.sh)"
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/$myuser/ProxmoxVE/$mybranch/install/${var_install}.sh)"
}
# This function sets the description of the container.

View File

@@ -4,12 +4,16 @@
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
myuser=mhop
mybranch=mhop
if ! command -v curl >/dev/null 2>&1; then
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
apt-get update >/dev/null 2>&1
apt-get install -y curl >/dev/null 2>&1
fi
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
#source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
source <(curl -fsSL https://raw.githubusercontent.com/$myuser/ProxmoxVE/$mybranch/misc/core.func)
load_functions
# This function enables IPv6 if it's not disabled and sets verbose mode
verb_ip6() {
@@ -29,7 +33,8 @@ catch_errors() {
# This function handles errors
error_handler() {
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
#source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
source <(curl -fsSL https://raw.githubusercontent.com/$myuser/ProxmoxVE/$mybranch/misc/api.func)
printf "\e[?25h"
local exit_code="$?"
local line_number="$1"
@@ -147,7 +152,8 @@ EOF
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
msg_ok "Updated Container OS"
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
#source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
source <(curl -fsSL https://raw.githubusercontent.com/$myuser/ProxmoxVE/$mybranch/misc/tools.func)
}
# This function modifies the message of the day (motd) and SSH settings
@@ -197,7 +203,8 @@ EOF
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
msg_ok "Customized Container"
fi
echo "bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${app}.sh)\"" >/usr/bin/update
#echo "bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${app}.sh)\"" >/usr/bin/update
echo "bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/$myuser/ProxmoxVE/$mybranch/ct/${app}.sh)\"" >/usr/bin/update
chmod +x /usr/bin/update
if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then