diff --git a/bin/updateip.sh b/bin/updateip.sh index a4c7875b..07be28e2 100755 --- a/bin/updateip.sh +++ b/bin/updateip.sh @@ -2,6 +2,7 @@ # Let's add the first local ip to the /etc/issue and external ip to ews.ip file # If the external IP cannot be detected, the internal IP will be inherited. source /etc/environment +myCHECKIFSENSOR=$(head -n 1 /opt/tpot/etc/tpot.yml | grep "Sensor" | wc -l) myUUID=$(lsblk -o MOUNTPOINT,UUID | grep "/" | awk '{ print $2 }') myLOCALIP=$(hostname -I | awk '{ print $1 }') myEXTIP=$(/opt/tpot/bin/myip.sh) @@ -51,7 +52,10 @@ echo ",---- [ \n ] [ \d ] [ \t ]" >> /etc/issue echo "|" >> /etc/issue echo "| IP: $myLOCALIP ($myEXTIP)" >> /etc/issue echo "| SSH: ssh -l tsec -p 64295 $myLOCALIP" >> /etc/issue -echo "| WEB: https://$myLOCALIP:64297" >> /etc/issue +if [ "$myCHECKIFSENSOR" == "0" ]; + then + echo "| WEB: https://$myLOCALIP:64297" >> /etc/issue +fi echo "| ADMIN: https://$myLOCALIP:64294" >> /etc/issue echo "$myBLACKHOLE_STATUS" >> /etc/issue echo "|" >> /etc/issue