34 lines
868 B
Bash
34 lines
868 B
Bash
##--------------##
|
|
# Pre-Config #
|
|
##--------------##
|
|
if [ -z "$PKGI" ] || [ -z "$PKGM" ]
|
|
then
|
|
PKGM="apt"
|
|
PKGI="${PKGM} install -y"
|
|
fi
|
|
|
|
$PKGM update
|
|
|
|
##-------------##
|
|
# Installer #
|
|
##-------------##
|
|
$PKGI unattended-upgrades
|
|
|
|
##----------------##
|
|
# OS Detection #
|
|
##----------------##
|
|
#!/bin/bash
|
|
source /etc/os-release
|
|
if [ "$ID" = "debian" ]; then
|
|
LinVer=Debian
|
|
elif [ "$ID" = "ubuntu" ]; then
|
|
LinVer=Ubuntu
|
|
else
|
|
echo "this OS is not supported"
|
|
fi
|
|
|
|
##-----------##
|
|
# Configs #
|
|
##-----------##
|
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Unattended-Security-Updates/raw/branch/master/config/Universal_20auto-upgrades -O /etc/apt/apt.conf.d/20auto-upgrades
|
|
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Unattended-Security-Updates/raw/branch/master/config/"$LinVer"_50unattended-upgrades -O /etc/apt/apt.conf.d/50unattended-upgrades |