Subversion Repositories SmartDukaan

Rev

Blame | Last modification | View Log | RSS feed

#/bin/sh

file="/var/log/services/nagios-Monitoring.properties"

if [ -f "$file" ]
then
  while IFS='=' read -r key value
  do
    key=$(echo $key | tr '.' '_')
    eval ${key}=\${value}
  done < "$file"
  currentBalance=${currentSmsCount}

else
  echo "$file not found."
fi
if [ $currentBalance -lt 1000 ]; then
                echo "CRITICAL - $currentBalance"
                exit 2
        elif [ 1000 -le $currentBalance ]; then
                echo "OK - $currentBalance"
                exit 0
        else
                echo "UNKNOWN - $currentBalance"
                exit 3
fi