From 7cb4aecfb2d2f5812c7054a75e97e48af95d16c4 Mon Sep 17 00:00:00 2001 From: "Gaunt, John" Date: Wed, 12 Dec 2018 21:04:31 -0500 Subject: [PATCH] auto install security updates --- domainjoin.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/domainjoin.sh b/domainjoin.sh index b291c6f..2db1e1f 100644 --- a/domainjoin.sh +++ b/domainjoin.sh @@ -9,13 +9,16 @@ if [ -f /etc/debian_version ]; then wget -O - http://repo.pbis.beyondtrust.com/apt/RPM-GPG-KEY-pbis | apt-key add - wget -O /etc/apt/sources.list.d/pbiso.list http://repo.pbis.beyondtrust.com/apt/pbiso.list apt update - apt install -y pbis-open sudo nano htop nload iperf3 iperf3 open-vm-tools + apt install -y pbis-open sudo nano htop nload iperf3 iperf3 open-vm-tools unattended-upgrade elif [ -f /etc/redhat-release ]; then yum install -y wget epel-release wget -O /etc/yum.repos.d/pbiso.repo http://repo.pbis.beyondtrust.com/yum/pbiso.repo yum clean all yum install -y pbis-open sudo nano htop nload iperf3 bind-utils open-vm-tools yum-cron - + sed --in-place "s/^update_cmd\ =\ default/update_cmd\ =\ security/" /etc/yum/yum-cron.conf + sed --in-place "s/^apply_updates\ =\ no/apply_updates\ =\ yes/" /etc/yum/yum-cron.conf + systemctl enable yum-cron + systemctl start yum-cron else echo "Unable to determine linux distro" exit