Update update-lxcs.sh

Added a restart command
pull/1120/head
802compute 2 years ago committed by GitHub
parent 2c27ff2cfe
commit 57f087c16c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      misc/update-lxcs.sh

@ -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

Loading…
Cancel
Save