Files
MacAdmin/Software/Avast/disable_AvastNotifications.sh
Zack T 99eb5cdf18 v1.0.0 = Initial Version
+ Initial Version
2018-11-28 20:58:18 -07:00

40 lines
1.1 KiB
Bash

#!/bin/bash
###################################################################################################
# Script Name: disable_AvastNotifications.sh
# By: Zack Thompson / Created: 11/27/2018
# Version: 1.0 / Updated: 11/27/2018 / By: ZT
#
# Description: This script disables Avast Notification pop-ups.
#
###########################################################
echo "***** disable_AvastNotifications process: START *****"
##################################################
# Define Variables
avastKeys=()
avastKeys+=("AlertPopupDuration")
avastKeys+=("InfoPopupDuration")
avastKeys+=("UpdatePopupDuration")
avastKeys+=("WarningPopupDuration")
##################################################
# Bits Staged
for key in ${avastKeys[@]}; do
echo "Disabling ${key}"
/usr/bin/su - "${3}" -c "/usr/bin/defaults write /Users/${3}/Library/Preferences/com.avast.helper.plist ${key} -integer 0" 2>&1 /dev/null
echo -n " --> Result: "
if [[ $? -eq 0 ]]; then
echo "Success"
else
echo "Failed"
exitCode=1
fi
done
echo "***** disable_AvastNotifications process: COMPLETE *****"
exit $exitCode