From 780919b1949fcdbf704121e69aa3e034229e0f08 Mon Sep 17 00:00:00 2001 From: Kris Payne Date: Tue, 29 Nov 2016 13:06:06 -0800 Subject: [PATCH] edit time script changing from a nested if..then to an elif. --- ElCapitan_CIS.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ElCapitan_CIS.sh b/ElCapitan_CIS.sh index 64ef9bb..326d74e 100644 --- a/ElCapitan_CIS.sh +++ b/ElCapitan_CIS.sh @@ -149,12 +149,11 @@ systemPreferences() { # 2.2.1 Enable "Set time and date automatically" # Level 2 Not Scored, Level 1.5 Not Scored if [[ ${CISLEVEL} = "1.5" ]]; then + if [[ "$(/usr/sbin/systemsetup -getusingnetworktime | awk '{ print $3 }')" = "On" ]]; then ScriptLogging " NetworkTime on. Ensuring server is time.apple.com." - - if [[ "$(/usr/sbin/systemsetup -getnetworktimeserver | awk '{ print $4 }')" = "time.apple.com" ]]; then + elif [[ "$(/usr/sbin/systemsetup -getnetworktimeserver | awk '{ print $4 }')" = "time.apple.com" ]]; then ScriptLogging " NetworkTime is on and set to time.apple.com." - fi else if [[ ! -e /etc/ntp.conf ]]; then ScriptLogging " Create '/etc/ntp.conf'"