From 7abe75b421a6ddff31b5babecac94909107a6262 Mon Sep 17 00:00:00 2001 From: Julien Lamarche Date: Tue, 18 Oct 2016 14:08:38 -0400 Subject: [PATCH] fixed lowDiskSpace for french --- lowDiskSpace.bash | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lowDiskSpace.bash b/lowDiskSpace.bash index fd5c0f6..b432997 100755 --- a/lowDiskSpace.bash +++ b/lowDiskSpace.bash @@ -64,7 +64,7 @@ chmod 600 $log #Check that the config file exists if [[ ! -f "$configFile" ]] ; then - echo "I need a file at $configFile with a list of mountpoints to ignore" + echo "I need a file at $configFile with a list of mountpoints to ignore" exit 1 fi @@ -82,7 +82,7 @@ hostname=`hostname` sendAlert=0 body='' IFS=$'\n'; for mount in `df`; do - if echo $mount | grep Filesystem ; then + if echo $mount | grep 'Filesystem\|fichiers' ; then continue fi @@ -96,11 +96,13 @@ IFS=$'\n'; for mount in `df`; do continue fi - if [ "$CURRENT" -gt "$THRESHOLD" ] ; then + if [[ "$CURRENT" -gt "$THRESHOLD" ]] ; then sendAlert=1 body=`echo -e "${body} Your $mountPoint ($filesystem) partition remaining free space on $hostname is used at $CURRENT% \\n"` echo $body + else + echo $mountPoint $CURRENT OK. fi done