Răsfoiți Sursa

Updated localchecks/edir-version.sh to v0.2

Michael Honkoop 3 zile în urmă
părinte
comite
4dd83ea965
1 a modificat fișierele cu 8 adăugiri și 6 ștergeri
  1. 8 6
      localchecks/edir-version.sh

+ 8 - 6
localchecks/edir-version.sh

@@ -4,18 +4,20 @@
 
 # License: GNU General Public License v2
 
-# Version 0.1
+# Version 0.1 : Initial release
+# Version 0.2 : Updated structure and status reporting when prerequisites are not met.
 #
-# Initial release of localcheck to get version information of ndsd via bash
+SCRIPTVERSION= 0.2
+
 # A similar check is available in this repository written in python (edir-version.py)
 #
 # This check should be placed in /usr/lib/check_mk_agent/local and made executable with `chmod +x edir-version.sh`
 
-# Check if ndsd is present on the system, if not then exit (nothing to do)
-# This assumes that you have exported the environment variables when installing eDirectory
-
+# Servicename to show in CheckMK
 SERVICE="ndsd"
 
+# Check if ndsd is present on the system, if not then report it.
+# This assumes that you have exported the environment variables when installing eDirectory
 if ! command -v "$SERVICE" >/dev/null 2>&1; then
     echo "3 \"$SERVICE\" - $SERVICE executable was not found."
     exit 0;
@@ -26,4 +28,4 @@ VersionInfo=$(ndsd --version)
 
 # Output formatted information to CheckMK
 echo "0 \"$(echo $VersionInfo | awk '{ print $2 }')\" - Binary Version $(echo $VersionInfo | awk '{ print $3 }'), DS Version $(echo $VersionInfo | awk '{ print $4 }')"
-
+exit 0;