From 034f15c00919772f253f1c4238d09bac96a9f7ca Mon Sep 17 00:00:00 2001 From: Guillaume Astier Ruiz Date: Thu, 17 Mar 2022 13:28:40 +0100 Subject: [PATCH] [UPDATE] Check IP service client/server --- monithor-client/usr/local/bin/monithor-client | 2 +- monithor-server/usr/local/bin/monithor-server | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monithor-client/usr/local/bin/monithor-client b/monithor-client/usr/local/bin/monithor-client index 443fbe6..45436e1 100755 --- a/monithor-client/usr/local/bin/monithor-client +++ b/monithor-client/usr/local/bin/monithor-client @@ -16,7 +16,7 @@ if [[ $(id -u) != "0" ]] Exit root fi -[[ ! -z $(ifconfig | grep inet | awk '{print $2}' | grep $LocalIp) ]] && Exit Config +[[ ! -z $(ifconfig | grep inet | awk '{print $2}' | grep $Ip) ]] && Exit Config if [[ "$1" == "start" ]] then diff --git a/monithor-server/usr/local/bin/monithor-server b/monithor-server/usr/local/bin/monithor-server index ee8af4c..6c1f393 100755 --- a/monithor-server/usr/local/bin/monithor-server +++ b/monithor-server/usr/local/bin/monithor-server @@ -18,7 +18,7 @@ if [[ $(id -u) != "0" ]] Exit root fi -[[ ! -z $(ifconfig | grep inet | awk '{print $2}' | grep $LocalIp) ]] && Exit Config +[[ -z $(ifconfig | grep inet | awk '{print $2}' | grep $LocalIp) ]] && Exit Config