Compare commits
39 Commits
tailscale-
...
6.12.5
Author | SHA1 | Date | |
---|---|---|---|
|
2d53681c99 | ||
|
fcb37cd2f6 | ||
|
2816295782 | ||
|
d51c6318d9 | ||
|
4db16ab50d | ||
|
dc04d84aa4 | ||
|
f023ba3cbd | ||
|
abf0d2390d | ||
|
93f9f2c691 | ||
|
f3c88f0fd2 | ||
|
96671aa9be | ||
|
abdd7c12cb | ||
|
24c8f7422f | ||
|
e75e481a9a | ||
|
edff3386b3 | ||
|
9fd6465be0 | ||
|
9210d0f6ab | ||
|
c53f078cbb | ||
|
3324d4bd1f | ||
|
264471d032 | ||
|
588c6ec80c | ||
|
d80995e682 | ||
|
1a67a68965 | ||
|
cd90daf483 | ||
|
52b8a0c9f4 | ||
|
1f9ee76883 | ||
|
e88e5e4193 | ||
|
df808e9b07 | ||
|
e69a94e7cf | ||
|
a0349267ff | ||
|
9596b91e09 | ||
|
e62d0e12be | ||
|
c42cff5320 | ||
|
4765dcb576 | ||
|
61eb1ef765 | ||
|
ee585aab54 | ||
|
54c2dfbdb0 | ||
|
2d6c7ab5ed | ||
|
8a74adb5f2 |
@@ -87,7 +87,7 @@ if (file_exists("/var/run/apcupsd.pid")) {
|
||||
if (count($rows)%2==1) $result[] = "<td></td><td></td></tr>";
|
||||
if ($power && isset($load)) $status[5] = ($load<90 ? "<td $green>" : "<td $red>").round($power*$load/100)." W (".$status[5].")</td>";
|
||||
elseif (isset($load)) $status[5] = ($load<90 ? "<td $green>" : "<td $red>").$status[5]."</td>";
|
||||
$status[6] = isset($output) ? ((!$volt || ($minv<$output && $output<$maxv) ? "<td $green>" : "<td $red>").$status[6].($freq ? " ~ $freq Hz" : "")."</td>") : $status[6];
|
||||
$status[6] = isset($output) ? ((!$volt || ($minv<$output && $output<$maxv) ? "<td $green>" : "<td $red>").$status[6].(isset($freq) ? " ~ $freq Hz" : "")."</td>") : $status[6];
|
||||
}
|
||||
if (empty($rows)) $result[] = "<tr><td colspan='4' style='text-align:center'>"._('No information available')."</td></tr>";
|
||||
|
||||
|
@@ -257,16 +257,14 @@ _(Template Authoring Mode)_:
|
||||
|
||||
:docker_authoring_mode_help:
|
||||
|
||||
<?if ($bridge):?>
|
||||
_(Docker custom network type)_:
|
||||
: <select name="DOCKER_NETWORK_TYPE">
|
||||
<?=mk_option(_var($dockercfg,'DOCKER_NETWORK_TYPE'), '1', _('ipvlan'))?>
|
||||
<?=mk_option(_var($dockercfg,'DOCKER_NETWORK_TYPE'), '', _('macvlan'))?>
|
||||
<?=mk_option(_var($dockercfg,'DOCKER_NETWORK_TYPE'), '1', _('ipvlan'), $bridge?'':'disabled')?>
|
||||
<?=mk_option(_var($dockercfg,'DOCKER_NETWORK_TYPE'), '', _('macvlan'), $bridge?'':'selected')?>
|
||||
</select> _(Please read the Help carefully)_. _(Misconfiguration can cause problems)_.
|
||||
|
||||
:docker_custom_network_type_help:
|
||||
|
||||
<?endif;?>
|
||||
_(Host access to custom networks)_:
|
||||
: <select name="DOCKER_ALLOW_ACCESS">
|
||||
<?=mk_option(_var($dockercfg,'DOCKER_ALLOW_ACCESS'), '', _('Disabled'))?>
|
||||
@@ -465,13 +463,11 @@ _(Docker LOG rotation)_:
|
||||
|
||||
:docker_log_rotation_active_help:
|
||||
|
||||
<?if ($bridge):?>
|
||||
_(Docker custom network type)_:
|
||||
: <?=_var($dockercfg,'DOCKER_NETWORK_TYPE')=='1' ? _('ipvlan') : _('macvlan')?>
|
||||
: <?=_var($dockercfg,'DOCKER_NETWORK_TYPE')!='1' || !$bridge ? _('macvlan') : _('ipvlan')?>
|
||||
|
||||
:docker_custom_network_type_help:
|
||||
|
||||
<?endif;?>
|
||||
_(Host access to custom networks)_:
|
||||
: <?=_var($dockercfg,'DOCKER_ALLOW_ACCESS')=='yes' ? _('Enabled') : _('Disabled')?>
|
||||
|
||||
|
@@ -1,62 +1,14 @@
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button{
|
||||
font-family:clear-sans;font-size:1.1rem;font-weight:bold;letter-spacing:2px;text-transform:uppercase;margin:10px 12px 10px 0;padding:9px 18px;text-decoration:none;white-space:nowrap;cursor:pointer;outline:none;border-radius:4px;border:0;color:#ff8c2f;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 0 no-repeat,-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#e22828),to(#e22828)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#ff8c2f),to(#ff8c2f)) 100% 100% no-repeat;background:linear-gradient(90deg,#e22828 0,#ff8c2f) 0 0 no-repeat,linear-gradient(90deg,#e22828 0,#ff8c2f) 0 100% no-repeat,linear-gradient(0deg,#e22828 0,#e22828) 0 100% no-repeat,linear-gradient(0deg,#ff8c2f 0,#ff8c2f) 100% 100% no-repeat;background-size:100% 2px,100% 2px,2px 100%,2px 100%
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button:hover{
|
||||
color:#f2f2f2;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f));background:linear-gradient(90deg,#e22828 0,#ff8c2f)
|
||||
}
|
||||
.ui-dropdownchecklist .ui-state-default{
|
||||
background:#f2f2f2;
|
||||
border:none;
|
||||
box-shadow:none;
|
||||
outline:none;
|
||||
cursor:pointer;
|
||||
height:2.2rem;
|
||||
line-height:2.2rem;
|
||||
}
|
||||
.ui-dropdownchecklist-group{
|
||||
font-weight:normal;
|
||||
font-style:italic;
|
||||
padding:1px 9px 1px 8px;
|
||||
}
|
||||
.ui-dropdownchecklist-selector{
|
||||
border:1px solid #1c1c1c;
|
||||
display:inline-block;
|
||||
cursor:pointer;
|
||||
padding:1px 9px 1px 8px;
|
||||
}
|
||||
.ui-dropdownchecklist-selector-wrapper{
|
||||
vertical-align:middle;
|
||||
font-size:0;
|
||||
}
|
||||
.ui-widget-header{
|
||||
border:none;
|
||||
background:#e3e3e3;
|
||||
color:#1c1c1c;
|
||||
font-weight:bold;
|
||||
}
|
||||
.ui-widget-content{
|
||||
border:1px solid #1c1c1c;
|
||||
background:#f2f2f2;
|
||||
color:#1c1c1c;
|
||||
|
||||
.ui-state-active{
|
||||
background:#e8e8e8;
|
||||
}
|
||||
.ui-dropdownchecklist-dropcontainer{
|
||||
background:#f2f2f2;
|
||||
border:1px solid #1c1c1c;
|
||||
}
|
||||
.ui-state-disabled{
|
||||
color:#1c1c1c;border-color:#a2a2a2;background:#e8e8e8;opacity:0.5;
|
||||
}
|
||||
.ui-dropdownchecklist-indent{
|
||||
padding-left:7px;
|
||||
}
|
||||
.ui-dropdownchecklist-text{
|
||||
color:#1c1c1c;
|
||||
font-size:1.3rem;
|
||||
}
|
||||
.ui-dropdownchecklist .ui-widget-content .ui-state-default{
|
||||
background:#f2f2f2;
|
||||
border:0px;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button{font-family:clear-sans;font-size:1.1rem;font-weight:bold;letter-spacing:2px;text-transform:uppercase;margin:10px 12px 10px 0;padding:9px 18px;text-decoration:none;white-space:nowrap;cursor:pointer;outline:none;border-radius:4px;border:0;color:#ff8c2f;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 0 no-repeat,-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#e22828),to(#e22828)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#ff8c2f),to(#ff8c2f)) 100% 100% no-repeat;background:linear-gradient(90deg,#e22828 0,#ff8c2f) 0 0 no-repeat,linear-gradient(90deg,#e22828 0,#ff8c2f) 0 100% no-repeat,linear-gradient(0deg,#e22828 0,#e22828) 0 100% no-repeat,linear-gradient(0deg,#ff8c2f 0,#ff8c2f) 100% 100% no-repeat;background-size:100% 2px,100% 2px,2px 100%,2px 100%}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button:hover{color:#f2f2f2;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f));background:linear-gradient(90deg,#e22828 0,#ff8c2f)}
|
||||
.ui-dropdownchecklist .ui-state-default{background:#f2f2f2;border:none;box-shadow:none;outline:none;cursor:pointer;height:2.2rem;line-height:2.2rem}
|
||||
.ui-dropdownchecklist-group{font-weight:normal;font-style:italic;padding:1px 9px 1px 8px}
|
||||
.ui-dropdownchecklist-selector{border:1px solid #1c1c1c;display:inline-block;cursor:pointer;padding:1px 9px 1px 8px}
|
||||
.ui-dropdownchecklist-selector-wrapper{vertical-align:middle;font-size:0}
|
||||
.ui-widget-header{border:none;background:#e3e3e3;color:#1c1c1c;font-weight:bold}
|
||||
.ui-widget-content{border:1px solid #1c1c1c;background:#f2f2f2;color:#1c1c1c}
|
||||
.ui-state-active{background:#e8e8e8}
|
||||
.ui-dropdownchecklist-dropcontainer{background:#f2f2f2;border:1px solid #1c1c1c}
|
||||
.ui-state-disabled{color:#1c1c1c;border-color:#a2a2a2;background:#e8e8e8;opacity:0.5}
|
||||
.ui-dropdownchecklist-indent{padding-left:7px}
|
||||
.ui-dropdownchecklist-text{color:#1c1c1c;font-size:1.3rem}
|
||||
.ui-dropdownchecklist .ui-widget-content .ui-state-default{background:#f2f2f2;border:0px}
|
||||
|
@@ -1,62 +1,14 @@
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button{
|
||||
font-family:clear-sans;font-size:1.1rem;font-weight:bold;letter-spacing:2px;text-transform:uppercase;margin:10px 12px 10px 0;padding:9px 18px;text-decoration:none;white-space:nowrap;cursor:pointer;outline:none;border-radius:4px;border:0;color:#ff8c2f;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 0 no-repeat,-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#e22828),to(#e22828)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#ff8c2f),to(#ff8c2f)) 100% 100% no-repeat;background:linear-gradient(90deg,#e22828 0,#ff8c2f) 0 0 no-repeat,linear-gradient(90deg,#e22828 0,#ff8c2f) 0 100% no-repeat,linear-gradient(0deg,#e22828 0,#e22828) 0 100% no-repeat,linear-gradient(0deg,#ff8c2f 0,#ff8c2f) 100% 100% no-repeat;background-size:100% 2px,100% 2px,2px 100%,2px 100%
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button:hover{
|
||||
color:#f2f2f2;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f));background:linear-gradient(90deg,#e22828 0,#ff8c2f)
|
||||
}
|
||||
.ui-dropdownchecklist .ui-state-default{
|
||||
background:#1c1c1c;
|
||||
border:none;
|
||||
box-shadow:none;
|
||||
outline:none;
|
||||
cursor:pointer;
|
||||
height:2.2rem;
|
||||
line-height:2.2rem;
|
||||
}
|
||||
.ui-dropdownchecklist-group{
|
||||
font-weight:normal;
|
||||
font-style:italic;
|
||||
padding:1px 9px 1px 8px;
|
||||
}
|
||||
.ui-dropdownchecklist-selector{
|
||||
border:1px solid #e5e5e5;
|
||||
display:inline-block;
|
||||
cursor:pointer;
|
||||
padding:1px 9px 1px 8px;
|
||||
}
|
||||
.ui-dropdownchecklist-selector-wrapper{
|
||||
vertical-align:middle;
|
||||
font-size:0;
|
||||
}
|
||||
.ui-widget-header{
|
||||
border:none;
|
||||
background:#2b2b2b;
|
||||
color:#f2f2f2;
|
||||
font-weight:bold;
|
||||
}
|
||||
.ui-widget-content{
|
||||
border:1px solid #e5e5e5;
|
||||
background:#1c1c1c;
|
||||
color:#f2f2f2;
|
||||
|
||||
.ui-state-active{
|
||||
background:#262626;
|
||||
}
|
||||
.ui-dropdownchecklist-dropcontainer{
|
||||
background:#1c1c1c;
|
||||
border:1px solid #e5e5e5;
|
||||
}
|
||||
.ui-state-disabled{
|
||||
color:#f2f2f2;border-color:#6c6c6c;background:#262626;opacity:0.5;
|
||||
}
|
||||
.ui-dropdownchecklist-indent{
|
||||
padding-left:7px;
|
||||
}
|
||||
.ui-dropdownchecklist-text{
|
||||
color:#f2f2f2;
|
||||
font-size:1.3rem;
|
||||
}
|
||||
.ui-dropdownchecklist .ui-widget-content .ui-state-default{
|
||||
background:#1c1c1c;
|
||||
border:0px;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button{font-family:clear-sans;font-size:1.1rem;font-weight:bold;letter-spacing:2px;text-transform:uppercase;margin:10px 12px 10px 0;padding:9px 18px;text-decoration:none;white-space:nowrap;cursor:pointer;outline:none;border-radius:4px;border:0;color:#ff8c2f;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 0 no-repeat,-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#e22828),to(#e22828)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#ff8c2f),to(#ff8c2f)) 100% 100% no-repeat;background:linear-gradient(90deg,#e22828 0,#ff8c2f) 0 0 no-repeat,linear-gradient(90deg,#e22828 0,#ff8c2f) 0 100% no-repeat,linear-gradient(0deg,#e22828 0,#e22828) 0 100% no-repeat,linear-gradient(0deg,#ff8c2f 0,#ff8c2f) 100% 100% no-repeat;background-size:100% 2px,100% 2px,2px 100%,2px 100%}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button:hover{color:#f2f2f2;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f));background:linear-gradient(90deg,#e22828 0,#ff8c2f)}
|
||||
.ui-dropdownchecklist .ui-state-default{background:#1c1c1c;border:none;box-shadow:none;outline:none;cursor:pointer;height:2.2rem;line-height:2.2rem}
|
||||
.ui-dropdownchecklist-group{font-weight:normal;font-style:italic;padding:1px 9px 1px 8px}
|
||||
.ui-dropdownchecklist-selector{border:1px solid #e5e5e5;display:inline-block;cursor:pointer;padding:1px 9px 1px 8px}
|
||||
.ui-dropdownchecklist-selector-wrapper{vertical-align:middle;font-size:0}
|
||||
.ui-widget-header{border:none;background:#2b2b2b;color:#f2f2f2;font-weight:bold}
|
||||
.ui-widget-content{border:1px solid #e5e5e5;background:#1c1c1c;color:#f2f2f2}
|
||||
.ui-state-active{background:#262626}
|
||||
.ui-dropdownchecklist-dropcontainer{background:#1c1c1c;border:1px solid #e5e5e5}
|
||||
.ui-state-disabled{color:#f2f2f2;border-color:#6c6c6c;background:#262626;opacity:0.5}
|
||||
.ui-dropdownchecklist-indent{padding-left:7px}
|
||||
.ui-dropdownchecklist-text{color:#f2f2f2;font-size:1.3rem}
|
||||
.ui-dropdownchecklist .ui-widget-content .ui-state-default{background:#1c1c1c;border:0px}
|
||||
|
@@ -1,62 +1,14 @@
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button{
|
||||
font-family:clear-sans;font-size:1.1rem;font-weight:bold;letter-spacing:2px;text-transform:uppercase;margin:10px 12px 10px 0;padding:9px 18px;text-decoration:none;white-space:nowrap;cursor:pointer;outline:none;border-radius:4px;border:0;color:#ff8c2f;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 0 no-repeat,-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#e22828),to(#e22828)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#ff8c2f),to(#ff8c2f)) 100% 100% no-repeat;background:linear-gradient(90deg,#e22828 0,#ff8c2f) 0 0 no-repeat,linear-gradient(90deg,#e22828 0,#ff8c2f) 0 100% no-repeat,linear-gradient(0deg,#e22828 0,#e22828) 0 100% no-repeat,linear-gradient(0deg,#ff8c2f 0,#ff8c2f) 100% 100% no-repeat;background-size:100% 2px,100% 2px,2px 100%,2px 100%
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button:hover{
|
||||
color:#f2f2f2;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f));background:linear-gradient(90deg,#e22828 0,#ff8c2f)
|
||||
}
|
||||
.ui-dropdownchecklist .ui-state-default{
|
||||
background:#1c1c1c;
|
||||
border:none;
|
||||
box-shadow:none;
|
||||
outline:none;
|
||||
cursor:pointer;
|
||||
height:2.2rem;
|
||||
line-height:2.2rem;
|
||||
}
|
||||
.ui-dropdownchecklist-group{
|
||||
font-weight:normal;
|
||||
font-style:italic;
|
||||
padding:1px 9px 1px 8px;
|
||||
}
|
||||
.ui-dropdownchecklist-selector{
|
||||
border:1px solid #e5e5e5;
|
||||
display:inline-block;
|
||||
cursor:pointer;
|
||||
padding:1px 9px 1px 8px;
|
||||
}
|
||||
.ui-dropdownchecklist-selector-wrapper{
|
||||
vertical-align:middle;
|
||||
font-size:0;
|
||||
}
|
||||
.ui-widget-header{
|
||||
border:none;
|
||||
background:#2b2b2b;
|
||||
color:#f2f2f2;
|
||||
font-weight:bold;
|
||||
}
|
||||
.ui-widget-content{
|
||||
border:1px solid #e5e5e5;
|
||||
background:#1c1c1c;
|
||||
color:#f2f2f2;
|
||||
|
||||
.ui-state-active{
|
||||
background:#262626;
|
||||
}
|
||||
.ui-dropdownchecklist-dropcontainer{
|
||||
background:#1c1c1c;
|
||||
border:1px solid #e5e5e5;
|
||||
}
|
||||
.ui-state-disabled{
|
||||
color:#f2f2f2;border-color:#6c6c6c;background:#262626;opacity:0.5;
|
||||
}
|
||||
.ui-dropdownchecklist-indent{
|
||||
padding-left:7px;
|
||||
}
|
||||
.ui-dropdownchecklist-text{
|
||||
color:#f2f2f2;
|
||||
font-size:1.3rem;
|
||||
}
|
||||
.ui-dropdownchecklist .ui-widget-content .ui-state-default{
|
||||
background:#1c1c1c;
|
||||
border:0px;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button{font-family:clear-sans;font-size:1.1rem;font-weight:bold;letter-spacing:2px;text-transform:uppercase;margin:10px 12px 10px 0;padding:9px 18px;text-decoration:none;white-space:nowrap;cursor:pointer;outline:none;border-radius:4px;border:0;color:#ff8c2f;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 0 no-repeat,-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#e22828),to(#e22828)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#ff8c2f),to(#ff8c2f)) 100% 100% no-repeat;background:linear-gradient(90deg,#e22828 0,#ff8c2f) 0 0 no-repeat,linear-gradient(90deg,#e22828 0,#ff8c2f) 0 100% no-repeat,linear-gradient(0deg,#e22828 0,#e22828) 0 100% no-repeat,linear-gradient(0deg,#ff8c2f 0,#ff8c2f) 100% 100% no-repeat;background-size:100% 2px,100% 2px,2px 100%,2px 100%}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button:hover{color:#f2f2f2;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f));background:linear-gradient(90deg,#e22828 0,#ff8c2f)}
|
||||
.ui-dropdownchecklist .ui-state-default{background:#1c1c1c;border:none;box-shadow:none;outline:none;cursor:pointer;height:2.2rem;line-height:2.2rem}
|
||||
.ui-dropdownchecklist-group{font-weight:normal;font-style:italic;padding:1px 9px 1px 8px}
|
||||
.ui-dropdownchecklist-selector{border:1px solid #e5e5e5;display:inline-block;cursor:pointer;padding:1px 9px 1px 8px}
|
||||
.ui-dropdownchecklist-selector-wrapper{vertical-align:middle;font-size:0}
|
||||
.ui-widget-header{border:none;background:#2b2b2b;color:#f2f2f2;font-weight:bold}
|
||||
.ui-widget-content{border:1px solid #e5e5e5;background:#1c1c1c;color:#f2f2f2}
|
||||
.ui-state-active{background:#262626}
|
||||
.ui-dropdownchecklist-dropcontainer{background:#1c1c1c;border:1px solid #e5e5e5}
|
||||
.ui-state-disabled{color:#f2f2f2;border-color:#6c6c6c;background:#262626;opacity:0.5}
|
||||
.ui-dropdownchecklist-indent{padding-left:7px}
|
||||
.ui-dropdownchecklist-text{color:#f2f2f2;font-size:1.3rem}
|
||||
.ui-dropdownchecklist .ui-widget-content .ui-state-default{background:#1c1c1c;border:0px}
|
||||
|
@@ -1,62 +1,14 @@
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button{
|
||||
font-family:clear-sans;font-size:1.1rem;font-weight:bold;letter-spacing:2px;text-transform:uppercase;margin:10px 12px 10px 0;padding:9px 18px;text-decoration:none;white-space:nowrap;cursor:pointer;outline:none;border-radius:4px;border:0;color:#ff8c2f;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 0 no-repeat,-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#e22828),to(#e22828)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#ff8c2f),to(#ff8c2f)) 100% 100% no-repeat;background:linear-gradient(90deg,#e22828 0,#ff8c2f) 0 0 no-repeat,linear-gradient(90deg,#e22828 0,#ff8c2f) 0 100% no-repeat,linear-gradient(0deg,#e22828 0,#e22828) 0 100% no-repeat,linear-gradient(0deg,#ff8c2f 0,#ff8c2f) 100% 100% no-repeat;background-size:100% 2px,100% 2px,2px 100%,2px 100%
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button:hover{
|
||||
color:#f2f2f2;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f));background:linear-gradient(90deg,#e22828 0,#ff8c2f)
|
||||
}
|
||||
.ui-dropdownchecklist .ui-state-default{
|
||||
background:#f2f2f2;
|
||||
border:none;
|
||||
box-shadow:none;
|
||||
outline:none;
|
||||
cursor:pointer;
|
||||
height:2.2rem;
|
||||
line-height:2.2rem;
|
||||
}
|
||||
.ui-dropdownchecklist-group{
|
||||
font-weight:normal;
|
||||
font-style:italic;
|
||||
padding:1px 9px 1px 8px;
|
||||
}
|
||||
.ui-dropdownchecklist-selector{
|
||||
border:1px solid #1c1c1c;
|
||||
display:inline-block;
|
||||
cursor:pointer;
|
||||
padding:1px 9px 1px 8px;
|
||||
}
|
||||
.ui-dropdownchecklist-selector-wrapper{
|
||||
vertical-align:middle;
|
||||
font-size:0;
|
||||
}
|
||||
.ui-widget-header{
|
||||
border:none;
|
||||
background:#e3e3e3;
|
||||
color:#1c1c1c;
|
||||
font-weight:bold;
|
||||
}
|
||||
.ui-widget-content{
|
||||
border:1px solid #1c1c1c;
|
||||
background:#f2f2f2;
|
||||
color:#1c1c1c;
|
||||
|
||||
.ui-state-active{
|
||||
background:#e8e8e8;
|
||||
}
|
||||
.ui-dropdownchecklist-dropcontainer{
|
||||
background:#f2f2f2;
|
||||
border:1px solid #1c1c1c;
|
||||
}
|
||||
.ui-state-disabled{
|
||||
color:#1c1c1c;border-color:#a2a2a2;background:#e8e8e8;opacity:0.5;
|
||||
}
|
||||
.ui-dropdownchecklist-indent{
|
||||
padding-left:7px;
|
||||
}
|
||||
.ui-dropdownchecklist-text{
|
||||
color:#1c1c1c;
|
||||
font-size:1.3rem;
|
||||
}
|
||||
.ui-dropdownchecklist .ui-widget-content .ui-state-default{
|
||||
background:#f2f2f2;
|
||||
border:0px;
|
||||
}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button{font-family:clear-sans;font-size:1.1rem;font-weight:bold;letter-spacing:2px;text-transform:uppercase;margin:10px 12px 10px 0;padding:9px 18px;text-decoration:none;white-space:nowrap;cursor:pointer;outline:none;border-radius:4px;border:0;color:#ff8c2f;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 0 no-repeat,-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#e22828),to(#e22828)) 0 100% no-repeat,-webkit-gradient(linear,left bottom,left top,from(#ff8c2f),to(#ff8c2f)) 100% 100% no-repeat;background:linear-gradient(90deg,#e22828 0,#ff8c2f) 0 0 no-repeat,linear-gradient(90deg,#e22828 0,#ff8c2f) 0 100% no-repeat,linear-gradient(0deg,#e22828 0,#e22828) 0 100% no-repeat,linear-gradient(0deg,#ff8c2f 0,#ff8c2f) 100% 100% no-repeat;background-size:100% 2px,100% 2px,2px 100%,2px 100%}
|
||||
.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset button:hover{color:#f2f2f2;background:-webkit-gradient(linear,left top,right top,from(#e22828),to(#ff8c2f));background:linear-gradient(90deg,#e22828 0,#ff8c2f)}
|
||||
.ui-dropdownchecklist .ui-state-default{background:#f2f2f2;border:none;box-shadow:none;outline:none;cursor:pointer;height:2.2rem;line-height:2.2rem}
|
||||
.ui-dropdownchecklist-group{font-weight:normal;font-style:italic;padding:1px 9px 1px 8px}
|
||||
.ui-dropdownchecklist-selector{border:1px solid #1c1c1c;display:inline-block;cursor:pointer;padding:1px 9px 1px 8px}
|
||||
.ui-dropdownchecklist-selector-wrapper{vertical-align:middle;font-size:0}
|
||||
.ui-widget-header{border:none;background:#e3e3e3;color:#1c1c1c;font-weight:bold}
|
||||
.ui-widget-content{border:1px solid #1c1c1c;background:#f2f2f2;color:#1c1c1c}
|
||||
.ui-state-active{background:#e8e8e8}
|
||||
.ui-dropdownchecklist-dropcontainer{background:#f2f2f2;border:1px solid #1c1c1c}
|
||||
.ui-state-disabled{color:#1c1c1c;border-color:#a2a2a2;background:#e8e8e8;opacity:0.5}
|
||||
.ui-dropdownchecklist-indent{padding-left:7px}
|
||||
.ui-dropdownchecklist-text{color:#1c1c1c;font-size:1.3rem}
|
||||
.ui-dropdownchecklist .ui-widget-content .ui-state-default{background:#f2f2f2;border:0px}
|
||||
|
@@ -20,6 +20,9 @@ require_once "$docroot/webGui/include/Secure.php";
|
||||
$_SERVER['REQUEST_URI'] = 'plugins';
|
||||
require_once "$docroot/webGui/include/Translations.php";
|
||||
|
||||
$tmpdir="/boot/deletemedowngrade.".uniqid();
|
||||
mkdir($tmpdir);
|
||||
exec("mv -f /boot/bz* $tmpdir");
|
||||
exec("mv -f /boot/previous/* /boot");
|
||||
$version = unscript(_var($_GET,'version'));
|
||||
file_put_contents("$docroot/plugins/unRAIDServer/README.md","**"._('DOWNGRADE TO VERSION')." $version**");
|
||||
|
@@ -755,6 +755,15 @@ private static $encoding = 'UTF-8';
|
||||
$arrWhitelistGPUClassIDregex = '/^(0001|03)/';
|
||||
$arrWhitelistAudioClassIDregex = '/^(0403)/';
|
||||
|
||||
# "System peripheral [0880]" "Global unichip corp. [1ac1]" "Coral Edge Tpu [089a]" -pff "Global unichip corp. [1ac1]" "Coral Edge Tpu [089a]"
|
||||
# typeid productid
|
||||
# file is csv typeid:productid
|
||||
#
|
||||
if (is_file("/boot/config/VMPCIOverride.cfg")) {
|
||||
$arrWhiteListOverride = str_getcsv(file_get_contents("/boot/config/VMPCIOverride.cfg")) ;
|
||||
}
|
||||
$arrWhiteListOverride[] = "0880:089a" ;
|
||||
|
||||
$arrValidPCIDevices = [];
|
||||
|
||||
exec("lspci -m -nn 2>/dev/null", $arrAllPCIDevices);
|
||||
@@ -769,6 +778,9 @@ private static $encoding = 'UTF-8';
|
||||
$boolBlacklisted = true;
|
||||
}
|
||||
|
||||
$overrideCheck = "{$arrMatch['typeid']}:{$arrMatch['productid']}" ;
|
||||
if (in_array($overrideCheck,$arrWhiteListOverride) ) $boolBlacklisted = false;
|
||||
|
||||
$strClass = 'other';
|
||||
if (preg_match($arrWhitelistGPUClassIDregex, $arrMatch['typeid'])) {
|
||||
$strClass = 'vga';
|
||||
|
@@ -82,7 +82,7 @@
|
||||
|
||||
if (auto === 'true' || auto == '1') {
|
||||
auto = true;
|
||||
connect();
|
||||
setTimeout(connect, 3000);
|
||||
}
|
||||
|
||||
function spice_error(e)
|
||||
|
@@ -1036,7 +1036,7 @@
|
||||
<tr class="<?if ($arrGPU['id'] != 'virtual') echo 'was';?>advanced vncmodel">
|
||||
<td>_(VM Console Video Driver)_:</td>
|
||||
<td>
|
||||
<select id="vncmodel" name="gpu[<?=$i?>][model]" class="narrow" title="_(video for VNC)_">
|
||||
<select id="vncmodel" name="gpu[<?=$i?>][model]" class="narrow" title="_(video for VM Console)_">
|
||||
<?mk_dropdown_options($arrValidVNCModels, $arrGPU['model']);?>
|
||||
</select>
|
||||
</td>
|
||||
@@ -1044,12 +1044,12 @@
|
||||
|
||||
<tr class="vncpassword">
|
||||
<td>_(VM Console Password)_:</td>
|
||||
<td><input type="password" name="domain[password]" autocomplete='new-password' value="<?=$arrGPU['password']?>" title="_(password for VNC)_" placeholder="_(password for VNC)_ (_(optional)_)" /></td>
|
||||
<td><input type="password" name="domain[password]" autocomplete='new-password' value="<?=$arrGPU['password']?>" title="_(password for VM Console)_" placeholder="_(password for VM Console)_ (_(optional)_)" /></td>
|
||||
</tr>
|
||||
<tr class="<?if ($arrGPU['id'] != 'virtual') echo 'was';?>advanced vnckeymap">
|
||||
<td>_(VM Console Keyboard)_:</td>
|
||||
<td>
|
||||
<select name="gpu[<?=$i?>][keymap]" title="_(keyboard for VNC)_">
|
||||
<select name="gpu[<?=$i?>][keymap]" title="_(keyboard for VM Console)_">
|
||||
<?mk_dropdown_options($arrValidKeyMaps, $arrGPU['keymap']);?>
|
||||
</select>
|
||||
</td>
|
||||
|
@@ -92,9 +92,31 @@ refresh(); // automatically include new ethernet ports
|
||||
Array.prototype.same = function(){return this.sort().filter(function(v,i,o){return i&&v===o[i-1]?v:0;}).length;}
|
||||
|
||||
function prepareSettings(form) {
|
||||
var metrics = [];
|
||||
var metrics6 = [];
|
||||
var bondnics = [], brnics = [];
|
||||
for (var i=0,nic; nic=form.BONDNICS.options[i]; i++) {
|
||||
if (nic.selected) {
|
||||
bondnics.push(nic.value);
|
||||
nic.selected = false;
|
||||
}
|
||||
}
|
||||
nic = form.BONDNICS.options[0];
|
||||
nic.value = bondnics.join(',');
|
||||
nic.selected = true;
|
||||
nic.disabled = false;
|
||||
for (var i=0,nic; nic=form.BRNICS.options[i]; i++) {
|
||||
if (nic.selected) {
|
||||
brnics.push(nic.value);
|
||||
nic.selected = false;
|
||||
}
|
||||
}
|
||||
nic = form.BRNICS.options[0];
|
||||
nic.value = form.BONDING.value=='yes' ? form.BONDNAME.value : brnics.join(',');
|
||||
nic.selected = true;
|
||||
nic.disabled = false;
|
||||
if (brnics.length>1) form.BRSTP.value = 'yes';
|
||||
if ($(form).find('input[name="#arg[1]"]').val()=='none') return true;
|
||||
|
||||
var metrics = [], metrics6 = [];
|
||||
$(form).find('input[name^="METRIC:"]').each(function(){if($(this).val()>0) metrics.push($(this).val());});
|
||||
$(form).find('input[name^="METRIC6:"]').each(function(){if($(this).val()>0) metrics6.push($(this).val());});
|
||||
if (metrics.same() || metrics6.same()) {
|
||||
@@ -123,31 +145,6 @@ function prepareSettings(form) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var member = '';
|
||||
for (var i=0,item; item=form.BONDNICS.options[i]; i++) {
|
||||
if (item.selected) {
|
||||
if (member.length) member += ',';
|
||||
member += item.value;
|
||||
item.selected = false;
|
||||
}
|
||||
}
|
||||
item = form.BONDNICS.options[0];
|
||||
item.value = member;
|
||||
item.selected = true;
|
||||
item.disabled = false;
|
||||
var member = '';
|
||||
for (var i=0,item; item=form.BRNICS.options[i]; i++) {
|
||||
if (item.selected) {
|
||||
if (member.length) member += ',';
|
||||
member += item.value;
|
||||
item.selected = false;
|
||||
}
|
||||
}
|
||||
item = form.BRNICS.options[0];
|
||||
item.value = form.BONDING.value=='yes' ? form.BONDNAME.value : member;
|
||||
item.selected = true;
|
||||
item.disabled = false;
|
||||
if (member.indexOf(',')>0) form.BRSTP.value = 'yes';
|
||||
$(form).find('select[name^="PROTOCOL:"]').each(function() {
|
||||
var protocol = $(this).val() || 'ipv4';
|
||||
var i = $(this).attr('name').split(':')[1];
|
||||
|
@@ -18,19 +18,28 @@ Tag="list"
|
||||
<?
|
||||
$zip = htmlspecialchars(str_replace(' ','_',strtolower($var['NAME'])));
|
||||
$log = '/var/log/syslog';
|
||||
$prev = '/boot/logs/syslog-previous';
|
||||
$cfg = '/boot/config/rsyslog.cfg';
|
||||
$max = 5000;
|
||||
$select = [];
|
||||
$logs = [];
|
||||
if (file_exists($cfg)) {
|
||||
$syslog = parse_ini_file($cfg);
|
||||
if (isset($syslog['local_server']) && isset($syslog['server_folder']) && $logs = glob($syslog['server_folder'].'/syslog-*.log',GLOB_NOSORT)) {
|
||||
if (!empty($syslog['local_server']) && !empty($syslog['server_folder']) && $logs = glob($syslog['server_folder'].'/syslog-*.log',GLOB_NOSORT)) {
|
||||
natsort($logs);
|
||||
$select[] = "<select onchange='showLog(this.value)'>";
|
||||
$select[] = mk_option(1,$log,'syslog');
|
||||
foreach ($logs as $file) $select[] = mk_option(1,$file,basename($file));
|
||||
$select[] = "</select>";
|
||||
}
|
||||
}
|
||||
if (file_exists($prev)) {
|
||||
// add syslog-previous to front of logs array
|
||||
array_unshift($logs, $prev);
|
||||
}
|
||||
if (count($logs)) {
|
||||
// add syslog to front of logs array
|
||||
array_unshift($logs, $log);
|
||||
$select[] = "<select onchange='showLog(this.value)'>";
|
||||
foreach ($logs as $file) $select[] = mk_option(1,$file,basename($file));
|
||||
$select[] = "</select>";
|
||||
}
|
||||
$select = implode($select);
|
||||
?>
|
||||
<style>
|
||||
|
@@ -138,21 +138,22 @@ $server = ipaddr($ethX);
|
||||
$dnsserver = _var($$ethX,'DNS_SERVER1');
|
||||
|
||||
$link = iflink($ethX);
|
||||
$vhost = str_replace(['eth','br','bond'],'vhost',$link);
|
||||
$postUp0 = "$script add $link WireGuard-<wg> $server <port> <port> udp";
|
||||
$postUp1 = "logger -t wireguard 'Tunnel WireGuard-<wg> started';$services";
|
||||
$postUp2 = "iptables -t nat -A POSTROUTING -s <source> -o $link -j MASQUERADE";
|
||||
$postUp2 = "iptables -t nat -A POSTROUTING -s <source> -o $link -j MASQUERADE;iptables -t nat -A POSTROUTING -s <source> -o $vhost -j MASQUERADE";
|
||||
$postUp3 = "iptables -N WIREGUARD_DROP_<WG>;iptables -A WIREGUARD -o $link -j WIREGUARD_DROP_<WG>";
|
||||
$postUpX = "iptables -A WIREGUARD_DROP_<WG> -s <source> -d <target> -j DROP";
|
||||
$postUpZ = "iptables -A WIREGUARD_DROP_<WG> -s <source> -j ACCEPT;iptables -A WIREGUARD_DROP_<WG> -j RETURN";
|
||||
$postUp26 = "ip6tables -t nat -A POSTROUTING -s <source> -o $link -j MASQUERADE";
|
||||
$postUp26 = "ip6tables -t nat -A POSTROUTING -s <source> -o $link -j MASQUERADE;ip6tables -t nat -A POSTROUTING -s <source> -o $vhost -j MASQUERADE";
|
||||
$postUp36 = "ip6tables -N WIREGUARD_DROP_<WG>;ip6tables -A WIREGUARD -o $link -j WIREGUARD_DROP_<WG>";
|
||||
$postUpX6 = "ip6tables -A WIREGUARD_DROP_<WG> -s <source> -d <target> -j DROP";
|
||||
$postUpZ6 = "ip6tables -A WIREGUARD_DROP_<WG> -s <source> -j ACCEPT;ip6tables -A WIREGUARD_DROP_<WG> -j RETURN";
|
||||
$postDown0 = "$script del $link <port> udp";
|
||||
$postDown1 = "logger -t wireguard 'Tunnel WireGuard-<wg> stopped';$services";
|
||||
$postDown2 = "iptables -t nat -D POSTROUTING -s <source> -o $link -j MASQUERADE";
|
||||
$postDown2 = "iptables -t nat -D POSTROUTING -s <source> -o $link -j MASQUERADE;iptables -t nat -D POSTROUTING -s <source> -o $vhost -j MASQUERADE";
|
||||
$postDown3 = "iptables -F WIREGUARD_DROP_<WG>;iptables -D WIREGUARD -o $link -j WIREGUARD_DROP_<WG>;iptables -X WIREGUARD_DROP_<WG>";
|
||||
$postDown26= "ip6tables -t nat -D POSTROUTING -s <source> -o $link -j MASQUERADE";
|
||||
$postDown26= "ip6tables -t nat -D POSTROUTING -s <source> -o $link -j MASQUERADE;ip6tables -t nat -D POSTROUTING -s <source> -o $vhost -j MASQUERADE";
|
||||
$postDown36= "ip6tables -F WIREGUARD_DROP_<WG>;ip6tables -D WIREGUARD -o $link -j WIREGUARD_DROP_<WG>;ip6tables -X WIREGUARD_DROP_<WG>";
|
||||
|
||||
$tld = @file_get_contents("$docroot/webGui/include/tld.key")?:'';
|
||||
@@ -252,7 +253,7 @@ refresh();
|
||||
Number.prototype.long2ip = function(){return [this>>>24,this>>>16&255,this>>>8&255,this&255].join('.');}
|
||||
String.prototype.ip2long = function(){var ip=this.split('.');return (ip[0]<<24)+(ip[1]<<16)+(ip[2]<<8)+(ip[3]*1);}
|
||||
String.prototype.desc = function(){return this.substr(this.lastIndexOf('/'));}
|
||||
String.prototype.patch = function(s,t){return t?this.replace(/<source>/,s).replace(/<target>/,t):this.replace(/<source>/,s);}
|
||||
String.prototype.patch = function(s,t){return t?this.replace(/<source>/g,s).replace(/<target>/,t):this.replace(/<source>/g,s);}
|
||||
Array.prototype.bind = function(w){return (this.join(';')).replace(/<WG>/g,w).replace(/,/g,';');}
|
||||
|
||||
var xml = $.cookie('upnp')||'<?=@file_get_contents('/var/tmp/upnp')?>';
|
||||
|
@@ -88,7 +88,7 @@ foreach ($disks as $name => $disk) {
|
||||
} else $luks = "";
|
||||
echo "<tr><td><a class='view' href=\"/$path/Browse?dir=/mnt/$name\"><i class=\"icon-u-tab\" title=\"",_('Browse')," /mnt/$name\"></i></a>";
|
||||
echo "<a class='info nohand' onclick='return false'><i class='fa fa-$orb orb $color-orb'></i><span style='left:18px'>$help</span></a>$luks<a href=\"/$path/Disk?name=$name\" onclick=\"$.cookie('one','tab1')\">",compress($name),"</a></td>";
|
||||
echo "<td>{$disk['comment']}</td>";
|
||||
echo "<td>"._var($disk,'comment')."</td>";
|
||||
echo "<td>",disk_share_settings(_var($var,'shareSMBEnabled'), $sec[$name]),"</td>";
|
||||
echo "<td>",disk_share_settings(_var($var,'shareNFSEnabled'), $sec_nfs[$name]),"</td>";
|
||||
$cmd="/webGui/scripts/disk_size&arg1=$name&arg2=ssz2";
|
||||
|
@@ -74,14 +74,14 @@ function ipaddr($ethX='eth0', $prot=4) {
|
||||
global $$ethX;
|
||||
switch (_var($$ethX,'PROTOCOL:0')) {
|
||||
case 'ipv4':
|
||||
return $$ethX['IPADDR:0'];
|
||||
return _var($$ethX,'IPADDR:0');
|
||||
case 'ipv6':
|
||||
return $$ethX['IPADDR6:0'];
|
||||
return _var($$ethX,'IPADDR6:0');
|
||||
case 'ipv4+ipv6':
|
||||
switch ($prot) {
|
||||
case 4: return $$ethX['IPADDR:0'];
|
||||
case 6: return $$ethX['IPADDR6:0'];
|
||||
default:return [$$ethX['IPADDR:0'],$$ethX['IPADDR6:0']];}
|
||||
case 4: return _var($$ethX,'IPADDR:0');
|
||||
case 6: return _var($$ethX,'IPADDR6:0');
|
||||
default:return [_var($$ethX,'IPADDR:0'),_var($$ethX,'IPADDR6:0')];}
|
||||
default:
|
||||
return _var($$ethX,'IPADDR:0');
|
||||
}
|
||||
|
@@ -306,6 +306,36 @@ function geturls() {
|
||||
return str_replace("\n", "\r\n", $urls);
|
||||
}
|
||||
|
||||
// anonymize individual syslog files
|
||||
function anonymize_syslog($file) {
|
||||
global $diag, $all;
|
||||
$max = 2*1024*1024; //=2MB
|
||||
$log = "/$diag/logs/".basename($file);
|
||||
run("todos <".escapeshellarg($file)." >".escapeshellarg("$log.txt"));
|
||||
if (!$all) {
|
||||
unset($titles,$rows);
|
||||
run("grep -Po 'file: \K[^\"\\x27]+' ".escapeshellarg("$log.txt")." 2>/dev/null|sort|uniq", $titles);
|
||||
run("sed -ri 's|\b\S+@\S+\.\S+\b|email@removed.com|;s|\b(username\|password)([=:])\S+\b|\\1\\2xxx|;s|(GUID: \S)\S+(\S) |\\1..\\2 |;s|(moving \"\S\|\"/mnt/user/\S).*(\S)\"|\\1..\\2\"|' ".escapeshellarg("$log.txt"));
|
||||
run("sed -ri 's|(server: ).+(\.(my)?unraid\.net(:[0-9]+)?,)|\\1hash\\2|;s|(host: \").+(\.(my)?unraid\.net(:[0-9]+)?\")|\\1hash\\2|;s|(referrer: \"https?://).+(\.(my)?unraid\.net)|\\1hash\\2|' ".escapeshellarg("$log.txt"));
|
||||
maskIP("$log.txt");
|
||||
foreach ($titles as $mover) {
|
||||
if (!$mover) continue;
|
||||
$title = "/{$mover[0]}..".substr($mover,-1)."/...";
|
||||
run("sed -i 's/".str_replace("/","\/",$mover)."/".str_replace("/","\/",$title)."/g' ".escapeshellarg("$log.txt")." 2>/dev/null");
|
||||
//run("sed -ri 's|(file: [.>cr].*)[ /]$mover/.*$|\\1 file: $title|' ".escapeshellarg("$log.txt")." 2>/dev/null");
|
||||
}
|
||||
run("grep -n ' cache_dirs: -' ".escapeshellarg("$log.txt")." 2>/dev/null|cut -d: -f1", $rows);
|
||||
for ($i = 0; $i < count($rows); $i += 2) for ($row = $rows[$i]+1; $row < $rows[$i+1]; $row++) run("sed -ri '$row s|(cache_dirs: \S).*(\S)|\\1..\\2|' ".escapeshellarg("$log.txt")." 2>/dev/null");
|
||||
}
|
||||
// replace consecutive repeated lines in syslog
|
||||
run("awk -i inplace '{if(s!=substr(\$0,17)){if(x>0)print\"### [PREVIOUS LINE REPEATED \"x\" TIMES] ###\\r\";print;x=0}else{x++}s=substr(\$0,17)}END{if(x>0)print\"### [PREVIOUS LINE REPEATED \"x\" TIMES] ###\\r\"}' ".escapeshellarg("$log.txt"));
|
||||
// remove SHA256 hashes
|
||||
run("sed -ri 's/(SHA256:).+[^\s\b]/SHA256:***REMOVED***/gm' $log.txt");
|
||||
// truncate syslog if too big
|
||||
if (basename($file)=='syslog' && filesize($file)>=$max) run("tail -n 200 ".escapeshellarg("$log.txt")." >".escapeshellarg("$log.last200.txt"));
|
||||
run("truncate -s '<$max' ".escapeshellarg("$log.txt"));
|
||||
}
|
||||
|
||||
// diagnostics start
|
||||
run("mkdir -p /boot/logs");
|
||||
|
||||
@@ -612,32 +642,11 @@ foreach ($all_xml as $xml) {
|
||||
}
|
||||
|
||||
// copy syslog information (anonymize if applicable)
|
||||
$max = 2*1024*1024; //=2MB
|
||||
foreach (glob("/var/log/syslog*") as $file) {
|
||||
$log = "/$diag/logs/".basename($file);
|
||||
run("todos <".escapeshellarg($file)." >".escapeshellarg("$log.txt"));
|
||||
if (!$all) {
|
||||
unset($titles,$rows);
|
||||
run("grep -Po 'file: \K[^\"\\x27]+' ".escapeshellarg("$log.txt")." 2>/dev/null|sort|uniq", $titles);
|
||||
run("sed -ri 's|\b\S+@\S+\.\S+\b|email@removed.com|;s|\b(username\|password)([=:])\S+\b|\\1\\2xxx|;s|(GUID: \S)\S+(\S) |\\1..\\2 |;s|(moving \"\S\|\"/mnt/user/\S).*(\S)\"|\\1..\\2\"|' ".escapeshellarg("$log.txt"));
|
||||
run("sed -ri 's|(server: ).+(\.(my)?unraid\.net(:[0-9]+)?,)|\\1hash\\2|;s|(host: \").+(\.(my)?unraid\.net(:[0-9]+)?\")|\\1hash\\2|;s|(referrer: \"https?://).+(\.(my)?unraid\.net)|\\1hash\\2|' ".escapeshellarg("$log.txt"));
|
||||
maskIP("$log.txt");
|
||||
foreach ($titles as $mover) {
|
||||
if (!$mover) continue;
|
||||
$title = "/{$mover[0]}..".substr($mover,-1)."/...";
|
||||
run("sed -i 's/".str_replace("/","\/",$mover)."/".str_replace("/","\/",$title)."/g' ".escapeshellarg("$log.txt")." 2>/dev/null");
|
||||
//run("sed -ri 's|(file: [.>cr].*)[ /]$mover/.*$|\\1 file: $title|' ".escapeshellarg("$log.txt")." 2>/dev/null");
|
||||
}
|
||||
run("grep -n ' cache_dirs: -' ".escapeshellarg("$log.txt")." 2>/dev/null|cut -d: -f1", $rows);
|
||||
for ($i = 0; $i < count($rows); $i += 2) for ($row = $rows[$i]+1; $row < $rows[$i+1]; $row++) run("sed -ri '$row s|(cache_dirs: \S).*(\S)|\\1..\\2|' ".escapeshellarg("$log.txt")." 2>/dev/null");
|
||||
}
|
||||
// replace consecutive repeated lines in syslog
|
||||
run("awk -i inplace '{if(s!=substr(\$0,17)){if(x>0)print\"### [PREVIOUS LINE REPEATED \"x\" TIMES] ###\\r\";print;x=0}else{x++}s=substr(\$0,17)}END{if(x>0)print\"### [PREVIOUS LINE REPEATED \"x\" TIMES] ###\\r\"}' ".escapeshellarg("$log.txt"));
|
||||
// remove SHA256 hashes
|
||||
run("sed -ri 's/(SHA256:).+[^\s\b]/SHA256:***REMOVED***/gm' $log.txt");
|
||||
// truncate syslog if too big
|
||||
if (basename($file)=='syslog' && filesize($file)>=$max) run("tail -n 200 ".escapeshellarg("$log.txt")." >".escapeshellarg("$log.last200.txt"));
|
||||
run("truncate -s '<$max' ".escapeshellarg("$log.txt"));
|
||||
anonymize_syslog($file);
|
||||
}
|
||||
foreach (glob("/boot/logs/syslog-previous*") as $file) {
|
||||
anonymize_syslog($file);
|
||||
}
|
||||
|
||||
// copy dhcplog
|
||||
|
@@ -25,7 +25,7 @@ function update_wireguard($ifname) {
|
||||
$vtun = basename($wg,'.conf');
|
||||
// interface has changed?
|
||||
if (exec("grep -Pom1 ' dev $nic ' $wg")=='') {
|
||||
exec("logger -t netconfig 'updated wireguard $vtun configuration'");
|
||||
exec("logger -t netconfig -- \"updated wireguard $vtun configuration\"");
|
||||
exec("sed -ri 's/ dev (br0|bond0|eth0) / dev $nic /' $wg");
|
||||
}
|
||||
// restart active wireguard tunnels
|
||||
@@ -81,7 +81,7 @@ if ($run) {
|
||||
}
|
||||
|
||||
// create configuration file for all available interfaces
|
||||
$i = 0; $new = []; $new[] = "# Generated settings:";
|
||||
$i = 0; $new = ["# Generated settings:"];
|
||||
foreach ($ini as $name => $port) {
|
||||
$bonding = $port['BONDING']=='yes';
|
||||
$bridging = $port['BRIDGING']=='yes';
|
||||
@@ -126,8 +126,8 @@ file_put_contents($cfg,implode("\r\n",$new)."\r\n");
|
||||
// start interface with updated (new) configuration
|
||||
// don't execute when only interface description has changed
|
||||
if ($run) {
|
||||
exec("/etc/rc.d/rc.inet1 {$ifname}_start >/dev/null 2>&1");
|
||||
exec("/usr/local/sbin/create_network_ini $ifname >/dev/null 2>&1 &");
|
||||
exec("/etc/rc.d/rc.inet1 {$ifname}_start &>/dev/null");
|
||||
exec("/usr/local/sbin/create_network_ini $ifname &>/dev/null &");
|
||||
update_wireguard($ifname);
|
||||
}
|
||||
exit(0);
|
||||
|
@@ -2,7 +2,7 @@ html{font-family:clear-sans;font-size:62.5%;height:100%}
|
||||
body{font-size:1.3rem;color:#606e7f;background-color:#e4e2e4;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
|
||||
@media (max-width:1280px){#template{min-width:1260px;max-width:1260px;margin:0}}
|
||||
@media (min-width:1281px){#template{min-width:1260px;margin:0}}
|
||||
@media (min-width:1921px){#template{min-width:1260px;max-width:1920px;margin:0 auto}}
|
||||
@media (min-width:1920px){#template{min-width:1260px;max-width:1920px;margin:0 auto}}
|
||||
img{border:none;text-decoration:none;vertical-align:middle}
|
||||
p{text-align:left}
|
||||
p.centered{text-align:left}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
html{font-family:clear-sans;font-size:62.5%;height:100%}
|
||||
body{font-size:1.3rem;color:#f2f2f2;background-color:#1c1b1b;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
|
||||
@media (max-width:1280px){#templsate{min-width:1260px;max-width:1260px;margin:0}}
|
||||
@media (max-width:1280px){#template{min-width:1260px;max-width:1260px;margin:0}}
|
||||
@media (min-width:1281px){#template{min-width:1260px;margin:0 10px}}
|
||||
@media (min-width:1921px){#template{min-width:1260px;max-width:1920px;margin:0 auto}}
|
||||
@media (min-width:1920px){#template{min-width:1260px;max-width:1920px;margin:0 auto}}
|
||||
img{border:none;text-decoration:none;vertical-align:middle}
|
||||
p{text-align:justify}
|
||||
p.centered{text-align:left}
|
||||
|
@@ -2,7 +2,7 @@ html{font-family:clear-sans;font-size:62.5%;height:100%}
|
||||
body{font-size:1.3rem;color:#606e7f;background-color:#1b1d1b;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
|
||||
@media (max-width:1280px){#template{min-width:1260px;max-width:1260px;margin:0}}
|
||||
@media (min-width:1281px){#template{min-width:1260px;margin:0}}
|
||||
@media (min-width:1921px){#template{min-width:1260px;max-width:1920px;margin:0 auto}}
|
||||
@media (min-width:1920px){#template{min-width:1260px;max-width:1920px;margin:0 auto}}
|
||||
img{border:none;text-decoration:none;vertical-align:middle}
|
||||
p{text-align:left}
|
||||
p.centered{text-align:left}
|
||||
|
@@ -2,7 +2,7 @@ html{font-family:clear-sans;font-size:62.5%;height:100%}
|
||||
body{font-size:1.3rem;color:#1c1b1b;background-color:#f2f2f2;padding:0;margin:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
|
||||
@media (max-width:1280px){#template{min-width:1260px;max-width:1260px;margin:0}}
|
||||
@media (min-width:1281px){#template{min-width:1260px;margin:0 10px}}
|
||||
@media (min-width:1921px){#template{min-width:1260px;max-width:1920px;margin:0 auto}}
|
||||
@media (min-width:1920px){#template{min-width:1260px;max-width:1920px;margin:0 auto}}
|
||||
img{border:none;text-decoration:none;vertical-align:middle}
|
||||
p{text-align:justify}
|
||||
p.centered{text-align:left}
|
||||
|
@@ -49,7 +49,7 @@ if (isset($_POST['#file'])) {
|
||||
$cleanup = isset($_POST['#cleanup']);
|
||||
$default = ($file && isset($_POST['#default'])) ? @parse_ini_file("$docroot/plugins/".basename(dirname($file))."/default.cfg", $section) : [];
|
||||
|
||||
$keys = @parse_ini_file($file, $section) ?: [];
|
||||
$keys = is_file($file) ? (parse_ini_file($file, $section) ?: []) : [];
|
||||
// the 'save' switch can be reset by the include file to disallow settings saving
|
||||
$save = true;
|
||||
if (isset($_POST['#include'])) {
|
||||
|
@@ -22,6 +22,7 @@ DOCKER_PIDFILE=/var/run/$DOCKERD.pid
|
||||
DOCKER_LOG=/var/log/docker.log
|
||||
DOCKER_ROOT=/var/lib/docker
|
||||
DOCKER_CFG=/boot/config/docker.cfg
|
||||
DOCKER_TIMEOUT=$(awk -F'"' '/^DOCKER_TIMEOUT=/{print $2}' $DOCKER_CFG 2>/dev/null)
|
||||
STOCK="eth br bond"
|
||||
|
||||
# network file references
|
||||
@@ -117,46 +118,6 @@ running_containers(){
|
||||
docker ps --format='{{.Names}}' 2>/dev/null
|
||||
}
|
||||
|
||||
max6() {
|
||||
# ipv6 addresses in long notation
|
||||
f=:ffff:
|
||||
for x in $*; do
|
||||
read a m < <(IFS=/; echo $x)
|
||||
[[ $a =~ $f && $a =~ '.' ]] && b=${a#*$f} a=${a%$f*}$f:0 || b=
|
||||
c=${a//[^:]/}
|
||||
[[ ${a:0:1} == : ]] && a=0${a}
|
||||
[[ ${a:${#a}-1} == : ]] && a=${a}0
|
||||
a=${a/::/:$(for((i=1;i<=$((8-${#c}));i++)); do printf "0:"; done)}
|
||||
d= a=$(for q in ${a//:/ }; do printf "$d%04x" "0x$q"; d=:; done)
|
||||
[[ -n $b ]] && d= a=${a%$f*}${f}$(for q in ${b//./ }; do printf "$d%03x" "0x$q"; d=.; done)
|
||||
[[ -z $m ]] && echo $a || echo $a/$m
|
||||
done
|
||||
}
|
||||
|
||||
min6() {
|
||||
# ipv6 address in short notation
|
||||
f=:ffff:
|
||||
[[ -n $1 ]] && read a m < <(IFS=/; echo $1) || return
|
||||
[[ $a =~ $f && $a =~ '.' ]] && b=${a#*$f} a=${a%$f*}$f || b=
|
||||
d= a=:$(for q in ${a//:/ }; do printf "$d%x" "0x$q"; d=:; done)
|
||||
a=${a/$(grep -Po ':(0(:|$)){2,8}' <<< $a|sort|tail -1)/::}
|
||||
[[ ${a:0:2} != :: ]] && a=${a:1}
|
||||
[[ -n $b ]] && d= a=${a%$f*}:$(for q in ${b//./ }; do printf "$d%x" "0x$q"; d=.; done)
|
||||
[[ -z $m ]] && echo $a || echo $a/$m
|
||||
}
|
||||
|
||||
wipe() {
|
||||
wet=($*)
|
||||
# remove temporary (privacy extensions) and host ipv6 addresses
|
||||
for tmp in $(ip -br -6 addr show scope global temporary dev $wet 2>/dev/null|awk '{$1=$2="";print}'); do
|
||||
for i in ${!wet[@]}; do
|
||||
[[ ${wet[$i]} == $tmp || (${wet[$i]} =~ '::' && ${wet[$i]#*/} == 128) ]] && unset 'wet[i]'
|
||||
done
|
||||
done
|
||||
# return cleaned-up list without interface name
|
||||
echo ${wet[@]/$wet}
|
||||
}
|
||||
|
||||
# Network driver
|
||||
driver() {
|
||||
# user selection when bridge is enabled
|
||||
@@ -347,7 +308,8 @@ start_network(){
|
||||
GATEWAY=$(ip -4 route show default dev $NETWORK|awk '{print $3;exit}')
|
||||
fi
|
||||
SUBNET6=; GATEWAY6=; SERVER6=; RANGE6=;
|
||||
IPV6=$(min6 $(max6 $(wipe $(ip -br -6 addr show $NETWORK scope global|awk '{$2="";print;exit}'))|sort|head -1))
|
||||
IPV6=$(ip -br -6 addr show $NETWORK scope global mngtmpaddr|awk '{print $3;exit}')
|
||||
[[ -z $IPV6 ]] && IPV6=$(ip -br -6 addr show $NETWORK scope global permanent|awk '{print $3;exit}')
|
||||
if [[ -n $IPV6 ]]; then
|
||||
# get IPV6 subnet, preset to /64 if single host address is given
|
||||
[[ ${IPV6#*/} == 128 ]] && SUBNET6=$(echo $IPV6|sed -r 's/^([^:]+):([^:]+):([^:]+):([^:]+).*$/\1:\2:\3:\4::\/64/') || SUBNET6=$(ip -6 route show $IPV6 dev $NETWORK|awk '{print $1;exit}')
|
||||
@@ -542,7 +504,9 @@ start_containers(){
|
||||
|
||||
# Stop containers
|
||||
stop_containers(){
|
||||
[[ ! -z $(running_containers) ]] && docker stop $(running_containers) >/dev/null
|
||||
[[ -n $(running_containers) ]] && docker stop --time=${DOCKER_TIMEOUT:-10} $(running_containers) >/dev/null
|
||||
# Kill containers if still running
|
||||
docker kill $(docker ps -q) 2>/dev/null
|
||||
}
|
||||
|
||||
# Start docker
|
||||
@@ -573,23 +537,35 @@ stop_docker(){
|
||||
echo "stopping $DOCKERD ..."
|
||||
# If there is no PID file, ignore this request...
|
||||
if [[ -r $DOCKER_PIDFILE ]]; then
|
||||
# Try to stop dockerd gracefully
|
||||
kill $(docker_pid) 2>/dev/null
|
||||
local TIMER=15
|
||||
# must ensure daemon has exited
|
||||
for n in {1..15}; do
|
||||
while [[ $TIMER -gt 0 ]]; do
|
||||
sleep 1
|
||||
if [[ $(ps -p $(docker_pid) -o comm= 2>/dev/null) != $DOCKERD ]]; then
|
||||
rm -f $DOCKER_PIDFILE
|
||||
# tear down the bridge
|
||||
if ip link show docker0 >/dev/null 2>&1; then
|
||||
if [[ -e $SYSTEM/docker0 ]]; then
|
||||
ip link set docker0 down
|
||||
ip link del docker0
|
||||
fi
|
||||
return
|
||||
# signal succesful stop
|
||||
TIMER=-1
|
||||
else
|
||||
# show waiting message
|
||||
echo "$DAEMON... Waiting to die."
|
||||
((TIMER--))
|
||||
fi
|
||||
echo "waiting for docker to die ..."
|
||||
done
|
||||
echo "docker will not die!"
|
||||
exit 1
|
||||
if [[ $TIMER -eq 0 ]]; then
|
||||
echo "Error: process will not die!"
|
||||
# Send SIGKILL to dockerd
|
||||
kill -SIGKILL $(docker_pid) 2>/dev/null
|
||||
# Remove .sock and .pid
|
||||
rm -f /var/run/docker.sock $DOCKER_PIDFILE
|
||||
echo "$DAEMON... Killed."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
@@ -20,6 +20,9 @@
|
||||
SIZE=$(awk '/MemTotal/{print $(NF-1)*128}' /proc/meminfo)
|
||||
echo "# limetech - Default ARC size is MemTotal/8 (in bytes)" > /etc/modprobe.d/zfs.conf
|
||||
echo "options zfs zfs_arc_max=$SIZE" >> /etc/modprobe.d/zfs.conf
|
||||
echo "#" >> /etc/modprobe.d/zfs.conf
|
||||
echo "# zfs data corruption mitigation, re: https://github.com/openzfs/zfs/issues/15526" >> /etc/modprobe.d/zfs.conf
|
||||
echo "options zfs zfs_dmu_offset_next_sync=0" >> /etc/modprobe.d/zfs.conf
|
||||
|
||||
# limetech - grab any user defined module conf files
|
||||
if [ -d /boot/config/modprobe.d ]; then
|
||||
|
@@ -577,6 +577,7 @@ build_ssl() {
|
||||
}
|
||||
|
||||
nginx_status() {
|
||||
sleep 0.1
|
||||
[[ -s $PID && -n "$(cat $PID)" && -d "/proc/$(cat $PID)" ]] && return 0 || return 1;
|
||||
}
|
||||
|
||||
@@ -643,6 +644,11 @@ nginx_stop() {
|
||||
unraid_api_control stop
|
||||
kill -QUIT $(cat $PID)
|
||||
wait_nginx_shutdown
|
||||
if nginx_status; then
|
||||
echo "Killing Nginx..."
|
||||
pkill -f $NGINX
|
||||
wait_nginx_shutdown
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
@@ -38,3 +38,5 @@ mkdir -p "$CFG_NEW"
|
||||
# stating with 6.10 'USE_SSL="auto"' without a LE cert is invalid
|
||||
[[ ! -f /boot/config/ssl/certs/certificate_bundle.pem ]] && sed -i s/USE_SSL=\"auto\"/USE_SSL=\"no\"/ /boot/config/ident.cfg
|
||||
|
||||
# delete any temp dir left over from a version downgrade (see dynamix.plugin.manager/include/Downgrade.php)
|
||||
rm -rf /boot/deletemedowngrade.*
|
||||
|
Reference in New Issue
Block a user