Update update-lxcs.sh

Added a restart command
This commit is contained in:
802compute 2023-03-01 12:49:13 -05:00 committed by GitHub
parent 2c27ff2cfe
commit 57f087c16c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -43,10 +43,10 @@ function update_container() {
echo -e "${BL}[Info]${GN} Updating ${BL}$container${CL} : ${GN}$name${CL} \n"
os=$(pct config "$container" | awk '/^ostype/ {print $2}')
case "$os" in
alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;;
alpine) pct exec "$container" -- ash -c "apk update && apk upgrade && reboot" ;;
archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm";;
fedora|rocky|centos|alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;;
ubuntu|debian|devuan) pct exec "$container" -- bash -c "apt-get update && apt-get -y dist-upgrade" ;;
fedora|rocky|centos|alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade && reboot" ;;
ubuntu|debian|devuan) pct exec "$container" -- bash -c "apt-get update && apt-get -y dist-upgrade && reboot" ;;
esac
}
header_info