Update build.func
This commit is contained in:
parent
1965d6dc25
commit
9e5c4d3456
@ -12,8 +12,8 @@ variables() {
|
||||
DIAGNOSTICS="yes" # sets the DIAGNOSTICS variable to "yes", used for the API call.
|
||||
METHOD="default" # sets the METHOD variable to "default", used for the API call.
|
||||
RANDOM_UUID="$(cat /proc/sys/kernel/random/uuid)" # generates a random UUID and sets it to the RANDOM_UUID variable.
|
||||
CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an global environment variable for the container type.
|
||||
ENABLE_FUSE="${ENABLE_FUSE:-no}" # Set an global environment variable for enabling FUSE.
|
||||
#CT_TYPE="${CT_TYPE:-$var_unprivileged}" # Set an global environment variable for the container type.
|
||||
#ENABLE_FUSE="${ENABLE_FUSE:-no}" # Set an global environment variable for enabling FUSE.
|
||||
}
|
||||
|
||||
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/api.func)
|
||||
@ -61,9 +61,7 @@ color() {
|
||||
ROOTSSH="${TAB}🔑${TAB}${CL}"
|
||||
CREATING="${TAB}🚀${TAB}${CL}"
|
||||
ADVANCED="${TAB}🧩${TAB}${CL}"
|
||||
CIFS="${TAB}🔌${TAB}${CL}"
|
||||
FUSE="${TAB}🔧${TAB}${CL}"
|
||||
NFS="${TAB}📂${TAB}${CL}"
|
||||
#FUSE="${TAB}🔧${TAB}${CL}"
|
||||
}
|
||||
|
||||
# This function enables error handling in the script by setting options and defining a trap for the ERR signal.
|
||||
@ -339,8 +337,8 @@ base_settings() {
|
||||
HN=$NSAPP
|
||||
BRG="vmbr0"
|
||||
NET="dhcp"
|
||||
IPv6="dhcp"
|
||||
IPv6GW=""
|
||||
#IPv6="dhcp"
|
||||
#IPv6GW=""
|
||||
GATE=""
|
||||
APT_CACHER=""
|
||||
APT_CACHER_IP=""
|
||||
@ -353,7 +351,7 @@ base_settings() {
|
||||
SSH="no"
|
||||
SSH_AUTHORIZED_KEY=""
|
||||
TAGS="community-script-dev;"
|
||||
ENABLE_FUSE="no"
|
||||
#ENABLE_FUSE="no"
|
||||
|
||||
# Override default settings with variables from ct script
|
||||
CT_TYPE=${var_unprivileged:-$CT_TYPE}
|
||||
@ -362,7 +360,7 @@ base_settings() {
|
||||
RAM_SIZE=${var_ram:-$RAM_SIZE}
|
||||
VERB=${var_verbose:-$VERBOSE}
|
||||
TAGS="${TAGS}${var_tags:-}"
|
||||
ENABLE_FUSE="${var_fuse:-${ENABLE_FUSE:-no}}"
|
||||
#ENABLE_FUSE="${var_fuse:-${ENABLE_FUSE:-no}}"
|
||||
|
||||
# Since these 2 are only defined outside of default_settings function, we add a temporary fallback. TODO: To align everything, we should add these as constant variables (e.g. OSTYPE and OSVERSION), but that would currently require updating the default_settings function for all existing scripts
|
||||
if [ -z "$var_os" ]; then
|
||||
@ -1410,15 +1408,15 @@ build_container() {
|
||||
FEATURES="nesting=1"
|
||||
fi
|
||||
|
||||
if [ "$ENABLE_FUSE" == "yes" ]; then
|
||||
FEATURES+=",fuse=1"
|
||||
fi
|
||||
#if [ "$ENABLE_FUSE" == "yes" ]; then
|
||||
# FEATURES+=",fuse=1"
|
||||
#fi
|
||||
|
||||
if [[ $DIAGNOSTICS == "yes" ]]; then
|
||||
post_to_api
|
||||
fi
|
||||
|
||||
FEATURES="${FEATURES#,}"
|
||||
#FEATURES="${FEATURES#,}"
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
pushd $TEMP_DIR >/dev/null
|
||||
if [ "$var_os" == "alpine" ]; then
|
||||
@ -1442,7 +1440,6 @@ build_container() {
|
||||
export PCT_OSTYPE="$var_os"
|
||||
export PCT_OSVERSION="$var_version"
|
||||
export PCT_DISK_SIZE="$DISK_SIZE"
|
||||
export IPv6="$IPv6"
|
||||
export PCT_OPTIONS="
|
||||
-features $FEATURES
|
||||
-hostname $HN
|
||||
@ -1520,7 +1517,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
|
||||
EOF'
|
||||
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
|
||||
fi
|
||||
lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $?
|
||||
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/install/$var_install.sh)" || exit $?
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user