From 373fe6e8129d31fcc05395c93019dba22022a3a2 Mon Sep 17 00:00:00 2001 From: Eric Loyd Date: Thu, 25 Sep 2025 10:26:43 -0400 Subject: [PATCH] Updated for NWC2025 --- NWC2025/ENV | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/NWC2025/ENV b/NWC2025/ENV index 6ba7bff..8391c5b 100755 --- a/NWC2025/ENV +++ b/NWC2025/ENV @@ -1,7 +1,5 @@ #!/bin/bash -[ "$1" = "set.txt" ] && . set.txt 2> /dev/null - declare -A myVar myVar[Name]="servicedesc" myVar[myDelim]="[ :]" @@ -32,7 +30,6 @@ Where: -s The result must match this value or else it will return blank --num The result will have all non-numbers stripped from it -NP Returns NAGIOS__HOSTNCPAPORT (implied default of 5693) - -N DEPRECATED version of -NT -NT Look for NAGIOS__HOSTNCPA (defaults to TOKEN) Can do double lookup if -HT is specified directly: -HT TOKEN will find NAGIOS__HOSTNCPATOKEN=Level1 which then finds NAGIOS__HOSTLEVEL1TOKEN=Secret Or -HT PASS will find NAGIOS__HOSTNCPAPASS=Level2 which will then find NAGIOS__HOSTLEVEL2PASS=SuperSecret @@ -76,8 +73,8 @@ while [ -n "$1" ]; do -s) myVar[myString]="$2"; shift 2;; --pre) myVar[myPrefix]="$2"; shift 2;; --post) myVar[myPostfix]="$2"; shift 2;; - -N|-NT) myOptions[doNCPA]="true"; shift 1;; --num) myOptions[doNumber]="true"; shift 1;; + -NT) myOptions[doNCPA]="true"; shift 1;; -NP) myVar[Name]="NAGIOS__HOSTNCPAPORT"; myVar[Default]="5693"; shift 1;; -H) myOptions[doHost]="true"; shift 1;; -S) myOptions[doService]="true"; shift 1;;