This commit is contained in:
tuend-work
2025-11-12 23:24:15 +07:00
parent 525acd79e4
commit 0b28a76e20
954 changed files with 57051 additions and 49 deletions

View File

@@ -0,0 +1,13 @@
#!/bin/sh
#Script to return the main useable device IP address of the box, used for main outbound connections.
#on a LAN, this should match your directadmin.conf lan_ip setting.
#for normal servers, this will likely return your license IP (usually)
#Will also be the default IP that exim sends email through.
OS=`uname`
if [ "${OS}" = "FreeBSD" ]; then
/sbin/ifconfig | grep inet | grep -m1 broadcast | awk '{ print $2; }'
else
/sbin/ip a | grep inet | grep -m1 brd | awk '{ print $2; };' | cut -d/ -f1
fi
RET=$?
exit $RET