Add files via upload

This commit is contained in:
Sebastian Palencsár
2025-01-22 09:13:20 +01:00
committed by GitHub
parent d5dca126a6
commit 5ecb235919
19 changed files with 821 additions and 2 deletions

View File

@@ -0,0 +1,38 @@
#!/bin/bash
# unattended-upgrades.sh
# This script sets up unattended upgrades for various Linux distributions
set -e
DISTRO=$(lsb_release -is)
case "$DISTRO" in
Ubuntu|Debian)
echo "Setting up unattended upgrades for $DISTRO..."
sudo apt-get update
sudo apt-get install -y unattended-upgrades
sudo dpkg-reconfigure --priority=low unattended-upgrades
;;
Fedora)
echo "Setting up unattended upgrades for Fedora..."
sudo dnf install -y dnf-automatic
sudo systemctl enable --now dnf-automatic-install.timer
;;
"Arch Linux")
echo "Setting up unattended upgrades for Arch Linux..."
sudo pacman -Syu --noconfirm
sudo systemctl enable --now paccache.timer
;;
openSUSE)
echo "Setting up unattended upgrades for openSUSE..."
sudo zypper install -y yast2-online-update-configuration
sudo yast2 online_update_configuration
;;
*)
echo "Unsupported distribution: $DISTRO"
exit 1
;;
esac
echo "Unattended upgrades setup complete."