- Replace logical OR (||) with nullish coalescing (??) operators
- Remove unnecessary type assertion for container_id
- Add missing dependencies to useEffect and useCallback hooks
- Remove unused variable in SSHKeyInput component
- Add isShell property to WebSocketMessage type definition
- Fix ServerInfo type to allow null in shell execution methods
All TypeScript and ESLint errors resolved, build now passes successfully.
msg_error "This version of Proxmox VE is not supported."
msg_error "Supported: Proxmox VE version 8.0 – 8.9"
exit1
fi
return0
fi
# Check for Proxmox VE 9.x: allow ONLY 9.0
if[["$PVE_VER"=~ ^9\.([0-9]+)]];then
localMINOR="${BASH_REMATCH[1]}"
if((MINOR != 0));then
msg_error "This version of Proxmox VE is not yet supported."
msg_error "Supported: Proxmox VE version 9.0"
exit1
fi
return0
fi
# All other unsupported versions
msg_error "This version of Proxmox VE is not supported."
msg_error "Supported versions: Proxmox VE 8.0 – 8.x or 9.0"
exit1
}
function arch_check(){
if["$(dpkg --print-architecture)" !="amd64"];then
echo -e "\n ${CROSS} This script will not work with PiMox! \n"
echo -e "Exiting..."
sleep 2
exit
fi
}
function ssh_check(){
ifcommand -v pveversion >/dev/null 2>&1;then
if[ -n "${SSH_CLIENT:+x}"];then
if whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "SSH DETECTED" --yesno "It's suggested to use the Proxmox shell instead of SSH, since SSH can create issues while gathering variables. Would you like to proceed with using SSH?"10 62;then
ifBRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN Bridge"858 vmbr0 --title "WAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3);then
if[ -z $BRG];then
BRG="vmbr0"
fi
echo -e "${DGN}Using WAN Bridge: ${BGN}$BRG${CL}"
else
exit-script
fi
ifLAN_BRG=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN Bridge"858 vmbr0 --title "LAN BRIDGE" --cancel-button Exit-Script 3>&1 1>&2 2>&3);then
if[ -z $LAN_BRG];then
LAN_BRG="vmbr0"
fi
echo -e "${DGN}Using LAN Bridge: ${BGN}$LAN_BRG${CL}"
else
exit-script
fi
ifLAN_IP_ADDR=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a router IP"858$LAN_IP_ADDR --title "LAN IP ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3);then
if[ -z $LAN_IP_ADDR];then
LAN_IP_ADDR="192.168.1.1"
fi
echo -e "${DGN}Using LAN IP ADDRESS: ${BGN}$LAN_IP_ADDR${CL}"
else
exit-script
fi
ifLAN_NETMASK=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a router netmask"858$LAN_NETMASK --title "LAN NETMASK" --cancel-button Exit-Script 3>&1 1>&2 2>&3);then
if[ -z $LAN_NETMASK];then
LAN_NETMASK="255.255.255.0"
fi
echo -e "${DGN}Using LAN NETMASK: ${BGN}$LAN_NETMASK${CL}"
else
exit-script
fi
ifMAC1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN MAC Address"858$GEN_MAC --title "WAN MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3);then
if[ -z $MAC1];then
MAC="$GEN_MAC"
else
MAC="$MAC1"
fi
echo -e "${DGN}Using WAN MAC Address: ${BGN}$MAC${CL}"
else
exit-script
fi
ifMAC2=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN MAC Address"858$GEN_MAC_LAN --title "LAN MAC ADDRESS" --cancel-button Exit-Script 3>&1 1>&2 2>&3);then
if[ -z $MAC2];then
LAN_MAC="$GEN_MAC_LAN"
else
LAN_MAC="$MAC2"
fi
echo -e "${DGN}Using LAN MAC Address: ${BGN}$LAN_MAC${CL}"
else
exit-script
fi
ifVLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a WAN Vlan (leave blank for default)"858 --title "WAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3);then
if[ -z $VLAN1];then
VLAN1="Default"
VLAN=""
else
VLAN=",tag=$VLAN1"
fi
echo -e "${DGN}Using WAN Vlan: ${BGN}$VLAN1${CL}"
else
exit-script
fi
ifVLAN2=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a LAN Vlan"858999 --title "LAN VLAN" --cancel-button Exit-Script 3>&1 1>&2 2>&3);then
if[ -z $VLAN2];then
VLAN2="999"
LAN_VLAN=",tag=$VLAN2"
else
LAN_VLAN=",tag=$VLAN2"
fi
echo -e "${DGN}Using LAN Vlan: ${BGN}$VLAN2${CL}"
else
exit-script
fi
ifMTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)"858 --title "MTU SIZE" --cancel-button Exit-Script 3>&1 1>&2 2>&3);then
if[ -z $MTU1];then
MTU1="Default"
MTU=""
else
MTU=",mtu=$MTU1"
fi
echo -e "${DGN}Using Interface MTU Size: ${BGN}$MTU1${CL}"
else
exit-script
fi
if(whiptail --backtitle "Proxmox VE Helper Scripts" --title "START VIRTUAL MACHINE" --yesno "Start VM when completed?"10 58);then
START_VM="yes"
else
START_VM="no"
fi
echo -e "${DGN}Start VM when completed: ${BGN}$START_VM${CL}"
if(whiptail --backtitle "Proxmox VE Helper Scripts" --title "ADVANCED SETTINGS COMPLETE" --yesno "Ready to create OpenWrt VM?" --no-button Do-Over 10 58);then
echo -e "${RD}Creating a OpenWrt VM using the above advanced settings${CL}"
// This is a heuristic - OpenSSH ED25519 keys typically start with specific patterns
// We'll default to "OpenSSH" for now since we can't reliably detect the type
keyType='OpenSSH';
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.