move install from /lib/systemd to /etc/systemd and faster dashboards IP response

dev
Tom Early 5 years ago
parent b513e0866b
commit cfe6ff83b8

@ -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)

@ -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;

@ -186,8 +186,8 @@ foreach($showlist as $section) {
echo '</code><br>', "\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:<br>', "\n";
echo '<table cellpadding="1" border="1" style="font-family: monospace">', "\n";
echo '<tr><td style="text-align:center">Internal</td><td style="text-align:center">IPV4</td>';

Loading…
Cancel
Save

Powered by TurnKey Linux.