homebrew.sh

Ajout d’une notification si httpd.conf a été modifié
This commit is contained in:
2019-11-07 14:04:49 +01:00
parent f678d88c78
commit 4399d440ec
2 changed files with 15 additions and 3 deletions

BIN
plugins.d/error.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -17,13 +17,25 @@
display_info=true
#add module to do_not_update array
declare -a do_not_update=('virtualbox,virtualbox-extension-pack')
declare -a do_not_update=('')
# No distract mode (no user interaction)(Casks with 'latest' version number won't be updated)
no_distract=false
#
#########################################
notification() {
sound="Basso"
title="Attention !!!"
message="$1 was modified in the last 5 minutes"
image="error.png"
if [[ "$OSTYPE" == "darwin"* ]] && [ -x "$(command -v terminal-notifier)" ]; then
terminal-notifier -title "$title" -message "$message" -sound "$sound" -contentImage "$image"
fi
}
if [[ $1 == "--nodistract" ]]; then
no_distract=true
fi
@@ -162,7 +174,7 @@ name=$(basename $conf_apa)
test=$(find $dir -name "$name" -mmin -5 -maxdepth 1)
[ ! -z $test ] && echo -e "\033[1;31m❗ $name was modified in the last 5 minutes\033[0m"
[ ! -z $test ] && notification $dir
# Homebrew 2.0.0+ run a cleanup every 30 days