18 lines
615 B
Bash
18 lines
615 B
Bash
###Fetch Config
|
|
mrepo=https://git.ictmaatwerk.com/VPS-scripts/Unattended-Security-Updates
|
|
mbranch=master
|
|
|
|
|
|
###OS Detection
|
|
source /etc/os-release
|
|
if [ "$ID" = "debian" ]; then
|
|
LinVer=Debian
|
|
elif [ "$ID" = "ubuntu" ]; then
|
|
LinVer=Ubuntu
|
|
else
|
|
echo "this OS is not supported"
|
|
fi
|
|
|
|
###Fetching Confgs
|
|
curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/config/Universal_20auto-upgrades -o /etc/apt/apt.conf.d/20auto-upgrades > $OUTPUT 2>&1
|
|
curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/config/"$LinVer"_50unattended-upgrades -o /etc/apt/apt.conf.d/50unattended-upgrades > $OUTPUT 2>&1 |