From c8a518704c0c15454d0c81b9f3e6d467e0a22ed3 Mon Sep 17 00:00:00 2001 From: Jack-Benny Persson Date: Wed, 1 Jan 2014 09:49:05 +0100 Subject: [PATCH] Fixed typo and replaced address with variable --- nagios-bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nagios-bootstrap.sh b/nagios-bootstrap.sh index e0bce4e..3715f21 100755 --- a/nagios-bootstrap.sh +++ b/nagios-bootstrap.sh @@ -56,9 +56,9 @@ Output=`$Nmap $Host` IP=`echo "$Output" | $Sed -n '3p' | tr -d '()' | awk '{ print $6 }'` Hostname=`echo "$Output" | $Sed -n '3p' | awk '{ print $5 }'` -Alias=`echo $Hostname | $Awk -F"." '{ printf $1 }'` +Alias=`echo $Hostname | $Awk -F"." '{ print $1 }'` -Services=`nmap labrat.nixnet.jke | sed -n '7,$p' | head -n -2 \ +Services=`nmap $Host | sed -n '7,$p' | head -n -2 \ | awk '{ print $3 }'` Index=0