Browse Source

Now gets internet IP for servers that are behind NAT

pull/1639/head
Daniel Gibbs 8 years ago
parent
commit
3e6463f7b0
  1. 3
      lgsm/functions/info_distro.sh
  2. 7
      lgsm/functions/info_messages.sh

3
lgsm/functions/info_distro.sh

@ -133,3 +133,6 @@ if [ -d "${backupdir}" ]; then
lastbackupsize=$(du -h "${lastbackup}" | awk '{print $1}')
fi
fi
# External IP address
extip=$(curl -m 3 ifconfig.co 2>/dev/null)

7
lgsm/functions/info_messages.sh

@ -134,6 +134,13 @@ fn_info_message_gameserver(){
# Server ip
echo -e "${blue}Server IP:\t${default}${ip}:${port}"
# External server ip
if [ -n "${extip}" ]; then
if [ "${ip}" != "${extip}"]; then
echo -e "${blue}Internet IP:\t${default}${extip}:${port}"
fi
fi
# Server password
if [ -n "${serverpassword}" ]; then
echo -e "${blue}Server password:\t${default}${serverpassword}"

Loading…
Cancel
Save