From 9bd27f93b07dd500a19d89be9fc9bbc04d3ecfa6 Mon Sep 17 00:00:00 2001 From: Lewis <39089724+master-vodawagner@users.noreply.github.com> Date: Thu, 13 Jun 2024 13:42:22 +0100 Subject: [PATCH 1/2] Update Microsoft Office 365.bash Version 0.0.4 - 13-Jun-2024, Lewis B (@master-vodawagner) # - Added ability to delay whilst Microsoft AutoUpdater is running/patching apps Signed-off-by: Lewis <39089724+master-vodawagner@users.noreply.github.com> --- Validations/Microsoft Office 365.bash | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Validations/Microsoft Office 365.bash b/Validations/Microsoft Office 365.bash index bf7aecb..d9a9297 100755 --- a/Validations/Microsoft Office 365.bash +++ b/Validations/Microsoft Office 365.bash @@ -12,6 +12,8 @@ # # Version 0.0.3, 25-Apr-2023, Andrew Clark (@drtaru) # - Changed Success result to Success to map to new SYM validation status +# Version 0.0.4 - 13-Jun-2024, Lewis B (@master-vodawagner) +# - Added ability to delay whilst Microsoft AutoUpdater is running/patching apps # #################################################################################### # A script to collect the installation status of Microsoft Office 365. # @@ -32,7 +34,7 @@ # #################################################################################################### -# Set Apps to check, valid options are: "Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "Microsoft PowerPoint" "Microsoft Word" "OneDrive" +# Set Apps to check, valid options are: "Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "Microsoft PowerPoint" "Microsoft Word" "OneDrive" & "Microsoft Teams" appsToCheck=("Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "Microsoft PowerPoint" "Microsoft Word" "OneDrive") appChecks="" RESULT="" @@ -50,6 +52,7 @@ IFS="" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # function appCheck() { + app="${1}" if [[ -f "/Applications/${app}.app/Contents/Info.plist" ]]; then appChecks+="${app} installed; " @@ -71,6 +74,12 @@ function appCheck() { # Check for Microsoft Office 365 apps (i.e., Microsoft_365_and_Office_16.70.23021201_Installer.pkg) # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # +#Allow Microsoft AutoUpdater to scan/patch apps before validating install +while pgrep -a "Microsoft AutoUpdate"; do + echo "Microsoft AutoUpdater is still running; pausing for 10 seconds" + sleep 10 +done + for app in ${appsToCheck[@]}; do appCheck "$app" done @@ -86,4 +95,4 @@ case "${appChecks}" in * ) RESULT="Success: ${appChecks}" ;; esac -/bin/echo "${RESULT}" \ No newline at end of file +/bin/echo "${RESULT}" From b6bfd8db38d220b51a805eaa5d2035862b51fd56 Mon Sep 17 00:00:00 2001 From: Lewis <39089724+master-vodawagner@users.noreply.github.com> Date: Thu, 13 Jun 2024 13:46:15 +0100 Subject: [PATCH 2/2] Update Microsoft Office 365.bash Version 0.0.4 - 13-Jun-2024, Lewis B (@master-vodawagner) # - Added ability to delay whilst Microsoft AutoUpdater is running/patching apps Signed-off-by: Lewis <39089724+master-vodawagner@users.noreply.github.com> --- Validations/Microsoft Office 365.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validations/Microsoft Office 365.bash b/Validations/Microsoft Office 365.bash index d9a9297..29d6452 100755 --- a/Validations/Microsoft Office 365.bash +++ b/Validations/Microsoft Office 365.bash @@ -34,7 +34,7 @@ # #################################################################################################### -# Set Apps to check, valid options are: "Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "Microsoft PowerPoint" "Microsoft Word" "OneDrive" & "Microsoft Teams" +# Set Apps to check, valid options are: "Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "Microsoft PowerPoint" "Microsoft Word" "OneDrive" appsToCheck=("Microsoft Excel" "Microsoft OneNote" "Microsoft Outlook" "Microsoft PowerPoint" "Microsoft Word" "OneDrive") appChecks="" RESULT=""