should work now.
This commit is contained in:
5
harden
5
harden
@@ -667,16 +667,13 @@ function update_system {
|
|||||||
export NEEDRESTART_MODE=a
|
export NEEDRESTART_MODE=a
|
||||||
export DEBIAN_PRIORITY=critical
|
export DEBIAN_PRIORITY=critical
|
||||||
# Running sudo with -E will preserve the environment variables set in the script
|
# Running sudo with -E will preserve the environment variables set in the script
|
||||||
sudo -E apt update -y && sudo apt upgrade -y # Update the package list and upgrade the packages
|
sudo -E apt update -y && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt autoclean -y # Update the package list, upgrade the packages, remove unnecessary packages and clean old package's cache
|
||||||
sudo -E apt install -y
|
|
||||||
;;
|
;;
|
||||||
"dnf") # If the package manager is dnf
|
"dnf") # If the package manager is dnf
|
||||||
sudo dnf upgrade -y # Update the package list
|
sudo dnf upgrade -y # Update the package list
|
||||||
sudo dnf install -y
|
|
||||||
;;
|
;;
|
||||||
"zypper") # If the package manager is zypper
|
"zypper") # If the package manager is zypper
|
||||||
sudo zypper update -y # Update the package list
|
sudo zypper update -y # Update the package list
|
||||||
sudo zypper install -y
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# If the package manager is not one of the above, output unsupported package manager
|
# If the package manager is not one of the above, output unsupported package manager
|
||||||
|
|||||||
Reference in New Issue
Block a user