From 3c92a3f47ced37b0a63d91c2cebe160fbc70a4dd Mon Sep 17 00:00:00 2001 From: djklim87 Date: Mon, 16 Sep 2024 15:04:55 +0200 Subject: [PATCH] Improvement of IP recognition --- manticore.conf.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/manticore.conf.sh b/manticore.conf.sh index d85aa07..685bb1a 100644 --- a/manticore.conf.sh +++ b/manticore.conf.sh @@ -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