diff --git a/Makefile b/Makefile index 69efef2..3352a00 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2020 by Thomas A. Early N7TAE +# Copyright (c) 2018-2021 by Thomas A. Early N7TAE # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ MMPATH=../MMDVMHost DMRPATH=../DMRGateway YSFPATH=../YSFClients/YSFGateway APRSPATH=../APRSGateway -SYSDIR=/lib/systemd/system +SYSDIR=/etc/systemd/system IRC=ircddb # use this if you want debugging help in the case of a crash @@ -205,7 +205,7 @@ installdtmf : qndtmf installdash : index.php /usr/bin/apt update - /usr/bin/apt install -y php-common php-fpm sqlite3 php-sqlite3 + /usr/bin/apt install -y php-common php-fpm sqlite3 php-sqlite3 dnsutils mkdir -p $(WWWDIR) mkdir -p dashboardV2/jsonData /bin/ln -f -s $(shell pwd)/index.php $(WWWDIR) diff --git a/dashboardV2/init.php b/dashboardV2/init.php index b683c4f..2f8a17f 100644 --- a/dashboardV2/init.php +++ b/dashboardV2/init.php @@ -48,9 +48,9 @@ function GetIP(string $type) if (strpos($ip, '.')) break; } } else if ('ipv6' == $type) - $ip = trim(`curl --silent -6 icanhazip.com`); + $ip = trim(`dig @resolver1.ipv6-sandbox.opendns.com AAAA myip.opendns.com +short -6`); else if ('ipv4' == $type) - $ip = trim(`curl --silent -4 icanhazip.com`); + $ip = trim(`dig @resolver4.opendns.com myip.opendns.com +short -4`); else $ip = ''; return $ip; diff --git a/index.php b/index.php index aab8925..8728c3d 100644 --- a/index.php +++ b/index.php @@ -186,8 +186,8 @@ foreach($showlist as $section) { echo '
', "\n"; break; case 'IP': - $hasv6 = str_contains(GetCFGValue('ircddb0_host'), 'v6'); - if (! $hasv6) $hasv6 = str_contains(GetCFGValue('ircddb1_host'), 'v6'); + $hasv6 = stristr(GetCFGValue('ircddb0_host'), 'v6'); + if (! $hasv6) $hasv6 = stristr(GetCFGValue('ircddb1_host'), 'v6'); echo 'IP Addresses:
', "\n"; echo '', "\n"; echo '';
InternalIPV4