From 4620ab071dcaed8e14c77ece164193aed7d11124 Mon Sep 17 00:00:00 2001 From: Bruno 21 Date: Tue, 17 Mar 2020 14:24:03 +0100 Subject: [PATCH] homebrew.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bugfix: ne pas tester la modif des php.ini si il n’y a pas eu de mises-à-jouir --- plugins.d/homebrew.sh | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/plugins.d/homebrew.sh b/plugins.d/homebrew.sh index 06f6732..5b7c6a2 100755 --- a/plugins.d/homebrew.sh +++ b/plugins.d/homebrew.sh @@ -330,17 +330,20 @@ echo "$test" php_versions=$(ls /usr/local/etc/php/) for php in $php_versions do - # file modified since it was last read - #if [ -N /usr/local/etc/php/$php/php.ini ]; then echo "modified"; fi + if [ -n "$upd3" ]; then + + # file modified since it was last read - php_modified=$(find /usr/local/etc/php/$php/ -name php.ini -newer /tmp/checkpoint) - php_ini=/usr/local/etc/php/$php/php.ini - notif2="$php_ini has been modified" + php_modified=$(find /usr/local/etc/php/$php/ -name php.ini -newer /tmp/checkpoint) + php_ini=/usr/local/etc/php/$php/php.ini + notif2="$php_ini has been modified" - echo "$php_modified" + echo "$php_modified" - [ ! -z $php_modified ] && echo -e "\033[1;31m❗️ ️$notif2\033[0m" - [ ! -z $php_modified ] && notification "$notif2" + [ ! -z $php_modified ] && echo -e "\033[1;31m❗️ ️$notif2\033[0m" + [ ! -z $php_modified ] && notification "$notif2" + + fi done echo ""