From 108f3ffe5f14c8b248ee62a3603d0e24f3706d2d Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 2 Feb 2023 10:35:31 -0500 Subject: [PATCH] Update update-lxcs.sh add rocky -centos-alma --- misc/update-lxcs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc/update-lxcs.sh b/misc/update-lxcs.sh index a47b3f08..e4542e09 100644 --- a/misc/update-lxcs.sh +++ b/misc/update-lxcs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function header_info { cat <<"EOF" __ __ __ __ __ _ ________ @@ -41,9 +41,9 @@ function update_container() { if [ "$os" == "alpine" ]; then pct exec $container -- ash -c "apk update && apk upgrade" elif [ "$os" == "ubuntu" ] || [ "$os" == "debian" ] || [ "$os" == "devuan" ]; then - pct exec $container -- bash -c "apt-get update && apt-get upgrade -y && apt-get clean && apt-get --purge autoremove -y" - elif [ "$os" == "fedora" ]; then - pct exec $container -- bash -c "dnf -y update && dnf -y upgrade && dnf -y --purge autoremove" + pct exec $container -- bash -c "apt-get update && apt-get -y upgrade" + elif [ "$os" == "fedora" ] || [ "$os" == "rocky" ] || [ "$os" == "centos" ] || [ "$os" == "alma" ]; then + pct exec $container -- bash -c "dnf -y update && dnf -y upgrade" elif [ "$os" == "archlinux" ]; then pct exec $container -- bash -c "pacman -Syyu --noconfirm" else