parent
7df826e73c
commit
db3ef0ab29
|
@ -1,3 +1,7 @@
|
|||
v1.3.0
|
||||
* New mrefd version (v0.3.0) with updated interlinking and correct peer display
|
||||
* Introducing healthchecks - read the README for information
|
||||
|
||||
v1.2.0
|
||||
* Code cleanup - remove unneeded parts
|
||||
* Rename "Repeaters" as "Links"
|
||||
|
|
13
README.md
13
README.md
|
@ -26,6 +26,18 @@ sudo cp config.inc.php.dist config.inc.php
|
|||
- Logo file
|
||||
- place your logo in /images (SVG preferred) and edit config.ini.php to change the logo image. Defaults to the M17 logo.
|
||||
|
||||
### Health Checks
|
||||
M17 Reflector Dashboard can now send health check data to the M17 Reflector team.
|
||||
- Send an email to contact@m17.link with your reflector name and a contact email for the responsible party of the reflector.
|
||||
- You will receive two emails when registration is completed, one to verify ownership of the contact email, and one with your GUID.
|
||||
- Place the GUID you received into the config.inc.php line $CallHome['GUID'] line.
|
||||
- Set up a cron job to run the check.php script every 5 minutes.
|
||||
```bash
|
||||
sudo crontab -e
|
||||
|
||||
*/5 * * * * cd /var/www/html && php check.php # change the cd to wherever your system www root is located
|
||||
```
|
||||
|
||||
### Files to edit
|
||||
- **include/config.inc.php**
|
||||
- ContactEmail - set this to the sysop's email address
|
||||
|
@ -34,6 +46,7 @@ sudo cp config.inc.php.dist config.inc.php
|
|||
- Homepage - set this to your homepage, defaults to m17project
|
||||
- Logo - set this to the filename of your logo, defaults to M17 logo
|
||||
- LocalModification - set this to your local modification version number if you modify the main code
|
||||
- CallHome GUID - Set this to your assigned Health Check GUID
|
||||
|
||||
**Do not** enable the calling home feature. This feature is not appropriate for mrefd.
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
if (file_exists("./include/config.inc.php")) {
|
||||
require_once("./include/config.inc.php");
|
||||
} else {
|
||||
die("config.inc.php does not exist. Be sure to copy /include/config.inc.php.dist to /include/config.inc.php and edit the file accordingly.");
|
||||
}
|
||||
|
||||
exec("pgrep mrefd", $output, $return);
|
||||
if ($return == 0) {
|
||||
echo "mrefd running.\n";
|
||||
file_get_contents("https://check.m17.link/ping/" . $CallHome['GUID']);
|
||||
} else {
|
||||
echo "mrefd not running?\n";
|
||||
file_get_contents("https://check.m17.link/ping/" . $CallHome['GUID'] . "/fail");
|
||||
}
|
||||
|
||||
?>
|
|
@ -11,7 +11,7 @@ ShowLast3ByteOfIP
|
|||
*/
|
||||
|
||||
$Service = array();
|
||||
$CallingHome = array();
|
||||
$CallHome = array();
|
||||
$PageOptions = array();
|
||||
|
||||
$PageOptions['ContactEmail'] = 'your_email'; // Support E-Mail address
|
||||
|
@ -23,6 +23,8 @@ $PageOptions['Logo'] = 'm17_logo.svg';
|
|||
$PageOptions['LocalModification'] = ''; // If you modify the dashboard code, you can say so here
|
||||
// with your mod version number, otherwise leave blank
|
||||
|
||||
$CallHome['GUID'] = ''; // Health Check GUID
|
||||
|
||||
$PageOptions['PageRefreshActive'] = true; // Activate automatic refresh
|
||||
$PageOptions['PageRefreshDelay'] = '10000'; // Page refresh time in miliseconds
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ $Reflector->LoadXML();
|
|||
<li<?php echo ($_GET['show'] == "links") ? ' class="nav-item active"' : ''; ?>><a class="nav-link" href="./index.php?show=links">Links (<?php echo $Reflector->NodeCount(); ?>)</a></li>
|
||||
<li<?php echo ($_GET['show'] == "peers") ? ' class="nav-item active"' : ''; ?>><a class="nav-link" href="./index.php?show=peers">Peers (<?php echo $Reflector->PeerCount(); ?>)</a></li>
|
||||
</ul>
|
||||
<span class="navbar-text px-2">mrefd v<?php echo $Reflector->GetVersion(); ?> - Dashboard v1.2.0 <?php echo $PageOptions['LocalModification']; ?></span>
|
||||
<span class="navbar-text px-2">mrefd v<?php echo $Reflector->GetVersion(); ?> - Dashboard v1.3.0 <?php echo $PageOptions['LocalModification']; ?></span>
|
||||
<span class="navbar-text px-2">Service uptime: <?php echo FormatSeconds($Reflector->GetServiceUptime()); ?></span>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
Loading…
Reference in New Issue