Browse Source

Check for log file readability

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1129 f882894a-f735-0410-b71e-b25c423dba1c
Ton Voon 21 năm trước cách đây
mục cha
commit
eff6bae7ed
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      plugins-scripts/check_log.sh

+ 3 - 0
plugins-scripts/check_log.sh

@@ -167,6 +167,9 @@ done
 if [ ! -e $logfile ]; then
 if [ ! -e $logfile ]; then
     $ECHO "Log check error: Log file $logfile does not exist!\n"
     $ECHO "Log check error: Log file $logfile does not exist!\n"
     exit $STATE_UNKNOWN
     exit $STATE_UNKNOWN
+elif [ ! -r $logfile ] ; then
+    $ECHO "Log check error: Log file $logfile is not readable!\n"
+    exit $STATE_UNKNOWN
 fi
 fi
 
 
 # If the old log file doesn't exist, this must be the first time
 # If the old log file doesn't exist, this must be the first time