From ef6f9eb7eb74d6e6898e7b7759a1860f2fe97f91 Mon Sep 17 00:00:00 2001 From: "b.waal" Date: Thu, 5 Sep 2019 10:16:35 +0200 Subject: [PATCH] Update 'installer.sh' --- installer.sh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/installer.sh b/installer.sh index 249c00c..1ff7c95 100644 --- a/installer.sh +++ b/installer.sh @@ -8,9 +8,21 @@ apt update ##-------------## apt install unattended-upgrades -y -##----------## -# Config # -##----------## +##----------------## +# 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 yet 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/Ubuntu_50unattended-upgrades -O /etc/apt/apt.conf.d/50unattended-upgrades -wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Unattended-Security-Updates/raw/branch/master/config/Debian_50unattended-upgrades -O /etc/apt/apt.conf.d/50unattended-upgrades \ No newline at end of file +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 \ No newline at end of file