Преглед изворни кода

Merge branch 'master' of https://github.com/jonschipp/nagios-plugins

Jon Schipp пре 12 година
родитељ
комит
6426a24ae4
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      README.md
  2. 1 1
      check_service.sh

+ 1 - 1
README.md

@@ -36,7 +36,7 @@ one cannot simply update the scripts with malicious code.
 
 **check_filesystem_stat.sh** - Recursively checks for filesystem input/output errors by directory using stat.
 
-**check_status_code.sh** - Checks exit code of another program and returns a custom Nagios status code based on the result.
+**negate.sh** - Checks exit code of another program and returns a custom Nagios status code based on the result.
 
 #### OSX only:
 

+ 1 - 1
check_service.sh

@@ -90,7 +90,7 @@ if [[ $OS == freebsd ]]; then
 fi
 
 if [[ $OS == osx ]]; then
-        if [ -f /usr/sbin/serveradmin >/dev/null 2>&1 ] && serveradmin list | grep "$SERVICE" 2>&1 >/dev/null; then
+        if command -v serveradmin >/dev/null 2>&1 && serveradmin list | grep "$SERVICE" 2>&1 >/dev/null; then
                 SERVICETOOL="serveradmin status $SERVICE"
                 LISTTOOL="serveradmin list"
         elif command -v launchctl >/dev/null 2>&1; then