Обновление LXC PVE

Создано 17 апр. 2025 г.

clear
echo "Update all Debian LXC"

for i in $(cat /etc/pve/.vmlist | grep node | cut -d '"' -f2 | sort -n)
do
        echo -e "\n Update lxc $i \n"
        pct exec $i -- bash -c "apt-get update && apt-get dist-upgrade -y && apt-get autoremove && apt-get autoclean && apt-get install -f"
        echo -e "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
done