#!/bin/bash HOSTNAME=$(hostname -s) FQDN=$(hostname) IPV4INT=$(ip addr | grep ' /etc/hosts echo "${IPV4} ${FQDN} ${HOSTNAME}" >> /etc/hosts apt remove -y iptables-persistent rm -R /etc/iptables echo "deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription" >> /etc/apt/sources.list wget http://download.proxmox.com/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg apt update apt -y full-upgrade export DEBIAN_FRONTEND=noninteractive apt install -y proxmox-ve postfix open-iscsi ifupdown2 apt remove -y os-prober linux-image-* update-grub echo "# deb https://enterprise.proxmox.com/debian/pve bullseye pve-enterprise" > /etc/apt/sources.list.d/pve-enterprise.list NETFILE=/etc/network/interfaces.new echo "" >> ${NETFILE} echo "auto vmbr0" >> ${NETFILE} echo "iface vmbr0 inet static" >> ${NETFILE} echo " address ${IPV4}/${IPV4MASK}" >> ${NETFILE} echo " gateway ${IPV4GW}" >> ${NETFILE} echo " bridge-ports ${IPV4INT}" >> ${NETFILE} echo " bridge-stp off" >> ${NETFILE} echo " bridge-fd 0" >> ${NETFILE} rm /etc/network/interfaces.d/*