mirror of
https://github.com/unraid/webgui.git
synced 2026-01-26 03:29:08 -06:00
Merge pull request #900 from bergware/master
Diagnostics - add DHCP log
This commit is contained in:
@@ -238,6 +238,12 @@ _(Template Authoring Mode)_:
|
||||
|
||||
:docker_authoring_mode_help:
|
||||
|
||||
_(Docker custom network type)_:
|
||||
: <select name="DOCKER_NETWORK_TYPE">
|
||||
<?=mk_option($dockercfg['DOCKER_NETWORK_TYPE'], '', _('macvlan'))?>
|
||||
<?=mk_option($dockercfg['DOCKER_NETWORK_TYPE'], '1', _('ipvlan'))?>
|
||||
</select>
|
||||
|
||||
_(Host access to custom networks)_:
|
||||
: <select name="DOCKER_ALLOW_ACCESS">
|
||||
<?=mk_option($dockercfg['DOCKER_ALLOW_ACCESS'], '', _('Disabled'))?>
|
||||
@@ -436,6 +442,9 @@ _(Docker LOG rotation)_:
|
||||
|
||||
:docker_log_rotation_active_help:
|
||||
|
||||
_(Docker custom network type)_:
|
||||
: <?=$dockercfg['DOCKER_NETWORK_TYPE']=='' ? _('macvlan') : _('ipvlan')?>
|
||||
|
||||
_(Host access to custom networks)_:
|
||||
: <?=$dockercfg['DOCKER_ALLOW_ACCESS']=='yes' ? _('Enabled') : _('Disabled')?>
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ case 'Add Route':
|
||||
break;
|
||||
default:
|
||||
exec("ip -4 route show|grep -v '^127.0.0.0'",$ipv4);
|
||||
exec("ip -6 route show|grep -Pv '^([m:]|(f[ef][0-9][0-9])::)|expires'",$ipv6);
|
||||
exec("ip -6 route show|grep -Pv '^([am:]|(f[ef][0-9][0-9])::)|expires'",$ipv6);
|
||||
foreach ($ipv4 as $info) {
|
||||
$cell = explode(' ',$info);
|
||||
$route = $cell[0];
|
||||
|
||||
@@ -14,16 +14,11 @@
|
||||
<?
|
||||
$docroot = '/usr/local/emhttp';
|
||||
$notify = "$docroot/webGui/scripts/notify";
|
||||
$unread = '';
|
||||
|
||||
require_once "$docroot/webGui/include/publish.php";
|
||||
|
||||
while (true) {
|
||||
$get = shell_exec("$notify get");
|
||||
if ($get != $unread) {
|
||||
publish('notify', $get);
|
||||
$unread = $get;
|
||||
}
|
||||
publish('notify', shell_exec("$notify get"));
|
||||
sleep(3);
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -341,6 +341,12 @@ foreach (glob("/var/log/syslog*") as $file) {
|
||||
if (basename($file)=='syslog' && filesize($file)>=$max) exert("tail -n 200 ".escapeshellarg("$log.txt")." >".escapeshellarg("$log.last200.txt"));
|
||||
exert("truncate -s '<$max' ".escapeshellarg("$log.txt"));
|
||||
}
|
||||
// copy dhcplog
|
||||
$dhcplog = "/var/log/dhcplog";
|
||||
if (file_exists($dhcplog)) {
|
||||
$log = "/$diag/logs/dhcplog.txt";
|
||||
exert("todos <$dhcplog >".escapeshellarg($log));
|
||||
}
|
||||
// copy graphql-api.log
|
||||
$graphql = "/var/log/graphql-api.log";
|
||||
if (file_exists($graphql)) {
|
||||
|
||||
Reference in New Issue
Block a user