From 4ddf5beaf87f79e71b11005eb2c8d324d71a8743 Mon Sep 17 00:00:00 2001 From: nnsense <2553412+nnsense@users.noreply.github.com> Date: Tue, 5 May 2026 17:21:06 +0000 Subject: [PATCH] fix: align pinchflat lxc settings --- ct/pinchflat.sh | 84 +++++------------------------------- install/pinchflat-install.sh | 9 ++-- 2 files changed, 14 insertions(+), 79 deletions(-) diff --git a/ct/pinchflat.sh b/ct/pinchflat.sh index b27003d5..76c04f31 100644 --- a/ct/pinchflat.sh +++ b/ct/pinchflat.sh @@ -1,10 +1,8 @@ #!/usr/bin/env bash - source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) - # Copyright (c) 2021-2026 community-scripts ORG # Author: nnsense -# License: MIT | https://github.com/--full/ProxmoxVED/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/kieraneglin/pinchflat APP="Pinchflat" @@ -21,76 +19,6 @@ variables color catch_errors -function default_settings() { - CT_TYPE="1" - PW="" - CT_ID=$NEXTID - HN=$NSAPP - DISK_SIZE="$var_disk" - CORE_COUNT="$var_cpu" - RAM_SIZE="$var_ram" - BRG="vmbr0" - NET="dhcp" - GATE="" - APT_CACHER="" - APT_CACHER_IP="" - DISABLEIP6="no" - MTU="" - SD="" - NS="" - MAC="" - VLAN="" - SSH="no" - VERB="no" - DOWNLOADS_PATH="/opt/pinchflat/downloads" - echo_default -} - -function advanced_settings() { - whiptail --backtitle "Proxmox VE Helper Scripts" --title "$APP LXC" --yesno "Use advanced settings?" 10 58 || return - - CT_TYPE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Container Type" --radiolist "Choose container type" 10 58 2 \ - "1" "Unprivileged" ON \ - "0" "Privileged" OFF 3>&1 1>&2 2>&3) - - HN=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Hostname" 8 58 "$NSAPP" 3>&1 1>&2 2>&3) - CORE_COUNT=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "CPU cores" 8 58 "$var_cpu" 3>&1 1>&2 2>&3) - RAM_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "RAM in MiB" 8 58 "$var_ram" 3>&1 1>&2 2>&3) - DISK_SIZE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Disk size in GiB" 8 58 "$var_disk" 3>&1 1>&2 2>&3) - - DOWNLOADS_PATH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Pinchflat Downloads" --inputbox \ -"Downloads path inside the LXC. - -Default: /opt/pinchflat/downloads -Example external mount path: /mnt/pinchflat - -If the path does not exist during installation, it will be created locally. -You can later stop the LXC, mount external storage at the same path, and start it again." \ -18 78 "/opt/pinchflat/downloads" 3>&1 1>&2 2>&3) - DOWNLOADS_PATH="${DOWNLOADS_PATH:-/opt/pinchflat/downloads}" - - BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Bridge" 8 58 "vmbr0" 3>&1 1>&2 2>&3) - - if whiptail --backtitle "Proxmox VE Helper Scripts" --title "Network" --yesno "Use DHCP?" 8 58; then - NET="dhcp" - GATE="" - else - NET=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Static IP/CIDR" 8 58 "192.168.0.100/24" 3>&1 1>&2 2>&3) - GATE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Gateway" 8 58 "192.168.0.1" 3>&1 1>&2 2>&3) - fi - - APT_CACHER="" - APT_CACHER_IP="" - DISABLEIP6="no" - MTU="" - SD="" - NS="" - MAC="" - VLAN="" - SSH="no" - VERB="no" -} - function update_script() { header_info check_container_storage @@ -130,6 +58,16 @@ function update_script() { exit } +DOWNLOADS_PATH=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "Pinchflat Downloads" --inputbox \ +"Downloads path inside the LXC. + +Default: /opt/pinchflat/downloads +Example external mount path: /mnt/pinchflat + +If the path does not exist during installation, it will be created locally. +You can later stop the LXC, mount external storage at the same path, and start it again." \ +18 78 "${DOWNLOADS_PATH:-/opt/pinchflat/downloads}" 3>&1 1>&2 2>&3 || true) +DOWNLOADS_PATH="${DOWNLOADS_PATH:-/opt/pinchflat/downloads}" export DOWNLOADS_PATH start diff --git a/install/pinchflat-install.sh b/install/pinchflat-install.sh index 32e8bd95..903f001d 100644 --- a/install/pinchflat-install.sh +++ b/install/pinchflat-install.sh @@ -2,7 +2,7 @@ # Copyright (c) 2021-2026 community-scripts ORG # Author: nnsense -# License: MIT | https://github.com/nnsense/ProxmoxVED/raw/main/LICENSE +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # Source: https://github.com/kieraneglin/pinchflat source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" @@ -33,7 +33,6 @@ $STD apt install -y \ pkg-config \ procps \ python3-mutagen \ - unzip \ zip msg_ok "Installed Dependencies" @@ -68,9 +67,7 @@ fetch_and_deploy_gh_release "pinchflat" "kieraneglin/pinchflat" "tarball" "lates msg_info "Configuring Pinchflat" CONFIG_PATH="/opt/pinchflat/config" -LOCAL_DOWNLOADS_PATH="/opt/pinchflat/downloads" -DOWNLOADS_PATH="${DOWNLOADS_PATH:-$LOCAL_DOWNLOADS_PATH}" -SECRET_KEY_BASE=$(openssl rand -base64 48) +DOWNLOADS_PATH="${DOWNLOADS_PATH:-/opt/pinchflat/downloads}" mkdir -p \ /etc/elixir_tzdata_data \ @@ -96,7 +93,7 @@ RUN_CONTEXT=selfhosted CONFIG_PATH=${CONFIG_PATH} MEDIA_PATH=${DOWNLOADS_PATH} TZ_DATA_PATH=/etc/elixir_tzdata_data -SECRET_KEY_BASE=${SECRET_KEY_BASE} +SECRET_KEY_BASE=$(openssl rand -base64 48) EOF msg_ok "Configured Pinchflat"