mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-15 11:43:31 +01:00
Compare commits
3 Commits
fix/app-de
...
fix_advanc
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ef2fb21f0 | |||
| 79113b3d17 | |||
| 557400470c |
@ -12,12 +12,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
## 2025-12-15
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- core: load app defaults before applying base_settings / fix composer cleanup after install/update [@MickLesk](https://github.com/MickLesk) ([#9965](https://github.com/community-scripts/ProxmoxVE/pull/9965))
|
||||
|
||||
## 2025-12-14
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
@ -205,10 +205,7 @@ update_motd_ip() {
|
||||
# - Falls back to warning if no keys provided
|
||||
# ------------------------------------------------------------------------------
|
||||
install_ssh_keys_into_ct() {
|
||||
[[ "${SSH:-no}" != "yes" ]] && return 0
|
||||
|
||||
# Ensure SSH_KEYS_FILE is defined (may not be set if advanced_settings was skipped)
|
||||
: "${SSH_KEYS_FILE:=}"
|
||||
[[ "$SSH" != "yes" ]] && return 0
|
||||
|
||||
if [[ -n "$SSH_KEYS_FILE" && -s "$SSH_KEYS_FILE" ]]; then
|
||||
msg_info "Installing selected SSH keys into CT ${CTID}"
|
||||
@ -433,14 +430,6 @@ base_settings() {
|
||||
ENABLE_FUSE=${var_fuse:-"${1:-no}"}
|
||||
ENABLE_TUN=${var_tun:-"${1:-no}"}
|
||||
|
||||
# Additional settings that may be skipped if advanced_settings is not run (e.g., App Defaults)
|
||||
ENABLE_GPU=${var_gpu:-"no"}
|
||||
ENABLE_NESTING=${var_nesting:-"1"}
|
||||
ENABLE_KEYCTL=${var_keyctl:-"0"}
|
||||
ENABLE_MKNOD=${var_mknod:-"0"}
|
||||
PROTECT_CT=${var_protection:-"no"}
|
||||
CT_TIMEZONE=${var_timezone:-"$timezone"}
|
||||
|
||||
# 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
|
||||
var_os="debian"
|
||||
@ -456,11 +445,9 @@ base_settings() {
|
||||
# - Safe parser for KEY=VALUE lines from vars files
|
||||
# - Used by default_var_settings and app defaults loading
|
||||
# - Only loads whitelisted var_* keys
|
||||
# - Optional force parameter to override existing values (for app defaults)
|
||||
# ------------------------------------------------------------------------------
|
||||
load_vars_file() {
|
||||
local file="$1"
|
||||
local force="${2:-no}" # If "yes", override existing variables
|
||||
[ -f "$file" ] || return 0
|
||||
msg_info "Loading defaults from ${file}"
|
||||
|
||||
@ -498,12 +485,8 @@ load_vars_file() {
|
||||
var_val="${BASH_REMATCH[1]}"
|
||||
fi
|
||||
|
||||
# Set variable: force mode overrides existing, otherwise only set if empty
|
||||
if [[ "$force" == "yes" ]]; then
|
||||
export "${var_key}=${var_val}"
|
||||
else
|
||||
[[ -z "${!var_key+x}" ]] && export "${var_key}=${var_val}"
|
||||
fi
|
||||
# Set only if not already exported
|
||||
[[ -z "${!var_key+x}" ]] && export "${var_key}=${var_val}"
|
||||
fi
|
||||
done <"$file"
|
||||
msg_ok "Loaded ${file}"
|
||||
@ -1909,13 +1892,13 @@ Advanced:
|
||||
echo -e "${BRIDGE}${BOLD}${DGN}Bridge: ${BGN}$BRG${CL}"
|
||||
echo -e "${NETWORK}${BOLD}${DGN}IPv4: ${BGN}$NET${CL}"
|
||||
echo -e "${NETWORK}${BOLD}${DGN}IPv6: ${BGN}$IPV6_METHOD${CL}"
|
||||
echo -e "${FUSE}${BOLD}${DGN}FUSE Support: ${BGN}${ENABLE_FUSE:-no}${CL}"
|
||||
[[ "${ENABLE_TUN:-no}" == "yes" ]] && echo -e "${NETWORK}${BOLD}${DGN}TUN/TAP Support: ${BGN}$ENABLE_TUN${CL}"
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Nesting: ${BGN}$([ "${ENABLE_NESTING:-1}" == "1" ] && echo "Enabled" || echo "Disabled")${CL}"
|
||||
[[ "${ENABLE_KEYCTL:-0}" == "1" ]] && echo -e "${CONTAINERTYPE}${BOLD}${DGN}Keyctl: ${BGN}Enabled${CL}"
|
||||
echo -e "${GPU}${BOLD}${DGN}GPU Passthrough: ${BGN}${ENABLE_GPU:-no}${CL}"
|
||||
[[ "${PROTECT_CT:-no}" == "yes" || "${PROTECT_CT:-no}" == "1" ]] && echo -e "${CONTAINERTYPE}${BOLD}${DGN}Protection: ${BGN}Enabled${CL}"
|
||||
[[ -n "${CT_TIMEZONE:-}" ]] && echo -e "${INFO}${BOLD}${DGN}Timezone: ${BGN}$CT_TIMEZONE${CL}"
|
||||
echo -e "${FUSE}${BOLD}${DGN}FUSE Support: ${BGN}$ENABLE_FUSE${CL}"
|
||||
[[ "$ENABLE_TUN" == "yes" ]] && echo -e "${NETWORK}${BOLD}${DGN}TUN/TAP Support: ${BGN}$ENABLE_TUN${CL}"
|
||||
echo -e "${CONTAINERTYPE}${BOLD}${DGN}Nesting: ${BGN}$([ "$ENABLE_NESTING" == "1" ] && echo "Enabled" || echo "Disabled")${CL}"
|
||||
[[ "$ENABLE_KEYCTL" == "1" ]] && echo -e "${CONTAINERTYPE}${BOLD}${DGN}Keyctl: ${BGN}Enabled${CL}"
|
||||
echo -e "${GPU}${BOLD}${DGN}GPU Passthrough: ${BGN}$ENABLE_GPU${CL}"
|
||||
[[ "$PROTECT_CT" == "yes" || "$PROTECT_CT" == "1" ]] && echo -e "${CONTAINERTYPE}${BOLD}${DGN}Protection: ${BGN}Enabled${CL}"
|
||||
[[ -n "$CT_TIMEZONE" ]] && echo -e "${INFO}${BOLD}${DGN}Timezone: ${BGN}$CT_TIMEZONE${CL}"
|
||||
[[ "$APT_CACHER" == "yes" ]] && echo -e "${INFO}${BOLD}${DGN}APT Cacher: ${BGN}$APT_CACHER_IP${CL}"
|
||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERBOSE${CL}"
|
||||
echo -e "${CREATING}${BOLD}${RD}Creating a ${APP} LXC using the above advanced settings${CL}"
|
||||
@ -2165,7 +2148,7 @@ install_script() {
|
||||
header_info
|
||||
echo -e "${DEFAULT}${BOLD}${BL}Using App Defaults for ${APP} on node $PVEHOST_NAME${CL}"
|
||||
METHOD="appdefaults"
|
||||
load_vars_file "$(get_app_defaults_path)" "yes" # Force override script defaults
|
||||
load_vars_file "$(get_app_defaults_path)"
|
||||
base_settings
|
||||
echo_default
|
||||
defaults_target="$(get_app_defaults_path)"
|
||||
|
||||
Reference in New Issue
Block a user