Skip to content

Commit

Permalink
Improvement of IP recognition
Browse files Browse the repository at this point in the history
  • Loading branch information
djklim87 committed Sep 16, 2024
1 parent 53e7b00 commit 3c92a3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions manticore.conf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ searchd {
}"
fi

if hostname -i > /dev/null 2>&1; then
hostip=$(hostname -i|rev|cut -d\ -f 1|rev)
elif hostname -I > /dev/null 2>&1; then
if hostname -I > /dev/null 2>&1; then
hostip=$(hostname -I|cut -d\ -f 1)
elif hostname -i > /dev/null 2>&1; then
hostip=$(hostname -i|rev|cut -d\ -f 1|rev)
else
hostip="0.0.0.0"
fi
Expand Down

0 comments on commit 3c92a3f

Please sign in to comment.