mirror of
https://github.com/opinkerfi/nagios-plugins.git
synced 2024-12-22 09:03:54 +01:00
This commit is contained in:
parent
2c1ae33ee4
commit
69418e7d40
@ -20,9 +20,9 @@ for ip in $IPS; do
|
||||
if [ $? -gt 0 ]; then
|
||||
HOSTN=$ip
|
||||
else
|
||||
HOSTN=`echo $RES | head -n 1 | sed 's/.*name pointer //'`
|
||||
HOSTN=`echo $RES | head -n 1 | sed 's/.*name pointer //' | sed 's/\.$//'`
|
||||
fi
|
||||
echo $ip = $HOSTN
|
||||
addhost --host $HOSTN --ip $ip --group misc
|
||||
addhost --host $HOSTN --ip $ip --group misc --templates autodiscover
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user