Update build.func
This commit is contained in:
parent
ea67c681bc
commit
3d83015e99
@ -333,13 +333,13 @@ write_config() {
|
|||||||
|
|
||||||
CT_TYPE="${CT_TYPE}"
|
CT_TYPE="${CT_TYPE}"
|
||||||
DISK_SIZE="${DISK_SIZE}"
|
DISK_SIZE="${DISK_SIZE}"
|
||||||
CORE_COUNT="${DISK_SIZE}"
|
CORE_COUNT="${CORE_COUNT}"
|
||||||
RAM_SIZE="${RAM_SIZE}"
|
RAM_SIZE="${RAM_SIZE}"
|
||||||
HN="${HN}"
|
HN="${HN}"
|
||||||
BRG="${BRG}"
|
BRG="${BRG}"
|
||||||
APT_CACHER_IP="${APT_CACHER_IP:-none}"
|
APT_CACHER_IP="${APT_CACHER_IP:-none}"
|
||||||
DISABLEIP6="${DISABLEIP6}"
|
DISABLEIP6="${DISABLEIP6}"
|
||||||
PW="${PW:-none}"
|
PW='${PW:-none}'
|
||||||
SSH="${SSH}"
|
SSH="${SSH}"
|
||||||
SSH_AUTHORIZED_KEY="${SSH_AUTHORIZED_KEY}"
|
SSH_AUTHORIZED_KEY="${SSH_AUTHORIZED_KEY}"
|
||||||
VERBOSE="${VERBOSE}"
|
VERBOSE="${VERBOSE}"
|
||||||
@ -351,6 +351,7 @@ SD="${SD:-none}"
|
|||||||
MAC="${MAC:-none}"
|
MAC="${MAC:-none}"
|
||||||
NS="${NS:-none}"
|
NS="${NS:-none}"
|
||||||
NET="${NET}"
|
NET="${NET}"
|
||||||
|
FUSE="${ENABLE_FUSE}"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
echo -e "${INFO}${BOLD}${GN}Writing configuration to ${FILEPATH}${CL}"
|
echo -e "${INFO}${BOLD}${GN}Writing configuration to ${FILEPATH}${CL}"
|
||||||
@ -364,7 +365,7 @@ EOF
|
|||||||
|
|
||||||
CT_TYPE="${CT_TYPE}"
|
CT_TYPE="${CT_TYPE}"
|
||||||
DISK_SIZE="${DISK_SIZE}"
|
DISK_SIZE="${DISK_SIZE}"
|
||||||
CORE_COUNT="${DISK_SIZE}"
|
CORE_COUNT="${CORE_COUNT}"
|
||||||
RAM_SIZE="${RAM_SIZE}"
|
RAM_SIZE="${RAM_SIZE}"
|
||||||
HN="${HN}"
|
HN="${HN}"
|
||||||
BRG="${BRG}"
|
BRG="${BRG}"
|
||||||
@ -382,6 +383,7 @@ SD="${SD:-none}"
|
|||||||
MAC="${MAC:-none}"
|
MAC="${MAC:-none}"
|
||||||
NS="${NS:-none}"
|
NS="${NS:-none}"
|
||||||
NET="${NET}"
|
NET="${NET}"
|
||||||
|
FUSE="${ENABLE_FUSE}"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
echo -e "${INFO}${BOLD}${GN}Writing configuration to ${FILEPATH}${CL}"
|
echo -e "${INFO}${BOLD}${GN}Writing configuration to ${FILEPATH}${CL}"
|
||||||
@ -861,12 +863,12 @@ advanced_settings() {
|
|||||||
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
echo -e "${ROOTSSH}${BOLD}${DGN}Root SSH Access: ${BGN}$SSH${CL}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE support?\nRequired for tools like rclone, mergerfs, AppImage, etc." 10 58); then
|
if (whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "FUSE Support" --yesno "Enable FUSE support?\nRequired for tools like rclone, mergerfs, AppImage, etc." 10 58); then
|
||||||
# ENABLE_FUSE="yes"
|
ENABLE_FUSE="yes"
|
||||||
# else
|
else
|
||||||
# ENABLE_FUSE="no"
|
ENABLE_FUSE="no"
|
||||||
# fi
|
fi
|
||||||
# echo -e "${FUSE}${BOLD}${DGN}Enable FUSE Support: ${BGN}$ENABLE_FUSE${CL}"
|
echo -e "${FUSE}${BOLD}${DGN}Enable FUSE Support: ${BGN}$ENABLE_FUSE${CL}"
|
||||||
|
|
||||||
if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
if (whiptail --backtitle "[dev] Proxmox VE Helper Scripts" --defaultno --title "VERBOSE MODE" --yesno "Enable Verbose Mode?" 10 58); then
|
||||||
VERBOSE="yes"
|
VERBOSE="yes"
|
||||||
@ -1269,23 +1271,29 @@ EOF'
|
|||||||
pct exec "$CTID" -- ash -c "apk add bash newt curl openssh nano mc ncurses >/dev/null"
|
pct exec "$CTID" -- ash -c "apk add bash newt curl openssh nano mc ncurses >/dev/null"
|
||||||
else
|
else
|
||||||
sleep 3
|
sleep 3
|
||||||
# Set locale and timezone before update
|
|
||||||
pct exec "$CTID" -- bash -c "sed -i '/$LANG/ s/^# //' /etc/locale.gen"
|
pct exec "$CTID" -- bash -c "sed -i '/$LANG/ s/^# //' /etc/locale.gen"
|
||||||
pct exec "$CTID" -- bash -c "locale_line=\$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print \$1}' | head -n 1) && \
|
pct exec "$CTID" -- bash -c "locale_line=\$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print \$1}' | head -n 1) && \
|
||||||
echo LANG=\$locale_line >/etc/default/locale && \
|
echo LANG=\$locale_line >/etc/default/locale && \
|
||||||
locale-gen >/dev/null && \
|
locale-gen >/dev/null && \
|
||||||
export LANG=\$locale_line"
|
export LANG=\$locale_line"
|
||||||
|
|
||||||
pct exec "$CTID" -- bash -c "echo $tz >/etc/timezone && ln -sf /usr/share/zoneinfo/$tz /etc/localtime"
|
if pct exec "$CTID" -- test -e "/usr/share/zoneinfo/$tz"; then
|
||||||
|
pct exec "$CTID" -- bash -c "echo $tz >/etc/timezone && ln -sf /usr/share/zoneinfo/$tz /etc/localtime"
|
||||||
|
else
|
||||||
|
msg_info "Skipping timezone setup – zone '$tz' not found in container"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Install curl
|
|
||||||
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"
|
||||||
lxc-attach -n "$CTID" -- bash -c "$(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://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/"$var_install".sh)" $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# This function sets the description of the container.
|
# This function sets the description of the container.
|
||||||
description() {
|
description() {
|
||||||
IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
IP=$(pct exec "$CTID" ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user