Added support for Mac OS to gather information

This commit is contained in:
mboelen 2014-09-21 12:58:08 +02:00
parent b4f6af1223
commit 116b1eab97
1 changed files with 10 additions and 0 deletions

View File

@ -290,6 +290,16 @@
fi
;;
MacOS)
if [ ! "${LSOFBINARY}" = "" ]; then
FIND=`${LSOFBINARY} -i -P | awk '{ print $9"|"$8"|"$1"|" }' | sed 's/\(.*\)\-\>.*\(\|.*\)/\1\2/' | sed 's/\*/'$IP'/' | sort -u | grep -v "NAME"`
else
FIND=""
fi
FIND2=""
;;
NetBSD)
if [ ! "${SOCKSTATBINARY}" = "" ]; then
FIND=`${SOCKSTATBINARY} | awk '{ if ($7 ~ /\*.\*/) print $5"|"$6"|"$2"|" }' | sort | uniq`