1
0

edir-version.sh 621 B

12345678910111213141516171819
  1. #!/bin/bash
  2. #
  3. # Version 0.1
  4. #
  5. # Initial release of localcheck to get version information of ndsd
  6. #
  7. # Check if ndsd is present on the system, if not then exit (nothing to do)
  8. # This assumes that you have exported the environment variables when installing eDirectory
  9. /usr/bin/which ndsd >/dev/null 2>&1
  10. if [ $? -ne 0 ]; then
  11. exit;
  12. fi
  13. # Execute command to retrieve information
  14. VersionInfo=$(ndsd --version)
  15. # Output formatted information to CheckMK
  16. echo "0 \"$(echo $VersionInfo | awk '{ print $2 }')\" - Binary Version $(echo $VersionInfo | awk '{ print $3 }'), DS Version $(echo $VersionInfo | awk '{ print $4 }')"