- Install elsewhere
authorZdeněk Šustr <sustr4@cesnet.cz>
Wed, 24 Aug 2011 13:08:04 +0000 (13:08 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Wed, 24 Aug 2011 13:08:04 +0000 (13:08 +0000)
- Recognize new options

org.glite.lb.nagios/Makefile
org.glite.lb.nagios/src/LB-probe

index efddae5..1ce5411 100644 (file)
@@ -3,15 +3,14 @@ stagedir=.
 package=emi-nagios-lb
 version=0.0.0
 prefix=
-LOCATION=/lib64/nagios/plugins/contrib/
 INSTALL=install
 
 -include Makefile.inc
 -include ${top_srcdir}/project/version.properties
 
 install:
-       mkdir -p ${DESTDIR}${PREFIX}${prefix}/lib64/nagios/plugins/contrib
-       ${INSTALL} -m 0755 src/LB-probe ${DESTDIR}${PREFIX}${prefix}/lib64/nagios/plugins/contrib/check_lb_server
+       mkdir -p ${DESTDIR}${PREFIX}${prefix}/libexec/grid-monitoring/probes/emi.lb
+       ${INSTALL} -m 0755 src/LB-probe ${DESTDIR}${PREFIX}${prefix}/libexec/grid-monitoring/probes/emi.lb
 
 stage:
        $(MAKE) install PREFIX=${stagedir}
index 51e5ded..81f4fc5 100755 (executable)
@@ -43,12 +43,14 @@ Console output:
 
 EndHelpHeader
 
-       echo "Usage: $progname [-h] [-v[v[v]]] [server[:port]]"
+       echo "Usage: $progname [-h] [-v[v[v]]] [-H server] [-p port] [server[:port]]"
        echo "Options:"
        echo "    -h | --help       Show this help message."
        echo "    -v[vv]            Verbosity level."
-       echo "    server:           Environmental variables are used if unspecified"
-       echo "    port:             Environmental variables or defaults are used if unspecified)"
+       echo "    -H <server>       server"
+       echo "    -p <server>       port"
+       echo "    <server>          Environmental variables are used if unspecified"
+       echo "    <port>            Environmental variables or defaults are used if unspecified)"
        echo ""
 }
 
@@ -120,6 +122,7 @@ function log_cleared()
 }
 
 VERBLEVEL=0
+TIMEOUT=0
 
 while test -n "$1"
 do
@@ -128,6 +131,9 @@ do
                "-v" )  VERBLEVEL=$(( $VERBLEVEL + 1 )) ;;
                "-vv" )  VERBLEVEL=$(( $VERBLEVEL + 2 )) ;;
                "-vvv" )  VERBLEVEL=$(( $VERBLEVEL + 3 )) ;;
+               "-H" ) shift && SRVPORT="${1}$SRVPORT" ;;
+               "-p" ) shift && SRVPORT="$SRVPORT:${1}" ;;
+               "-t" ) shift && TIMEOUT=$1 ;;
                *) SRVPORT="$1" ;;
 #              "-t" | "--text")  setOutputASCII ;;
        esac