mirror of
https://github.com/MLBZ521/MacAdmin.git
synced 2026-02-03 05:53:26 +00:00
v1.0.0 = Initial Version
+ Initial Version
This commit is contained in:
40
Software/Avast/disable_AvastNotifications.sh
Normal file
40
Software/Avast/disable_AvastNotifications.sh
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user