1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00
raspap-webgui/templates/wg/logging.php

20 lines
1008 B
PHP
Raw Normal View History

2020-04-22 11:02:07 +02:00
<!-- wireguard logging tab -->
<div class="tab-pane fade" id="wglogging">
<div class="row">
2020-09-05 20:27:38 +02:00
<div class="col-md-12">
2020-04-22 11:02:07 +02:00
<h4 class="mt-3"><?php echo _("Logging"); ?></h4>
2020-09-05 20:27:38 +02:00
<div class="custom-control custom-switch">
2021-12-31 14:10:27 +01:00
<input class="custom-control-input" id="wgLogEnable" type="checkbox" name="wgLogEnable" value="1" <?php echo $optLogEnable ? ' checked="checked"' : "" ?> aria-describedby="wgLogEnable">
<label class="custom-control-label" for="wgLogEnable"><?php echo _("Display WireGuard debug log") ?></label>
2020-09-05 20:27:38 +02:00
</div>
2021-12-31 14:10:27 +01:00
<p><small><?php echo _("Enable this option to display an updated WireGuard debug log.") ?></small></p>
2020-09-05 20:27:38 +02:00
<?php
exec('sudo chmod o+r /tmp/wireguard.log');
$log = file_get_contents('/tmp/wireguard.log');
echo '<textarea class="logoutput my-3">'.htmlspecialchars($log, ENT_QUOTES).'</textarea>';
?>
2020-04-22 11:02:07 +02:00
</div>
</div><!-- /.row -->
</div><!-- /.tab-pane | logging tab -->