From: <abe...@us...> - 2017-07-16 13:24:31
|
Revision: 8445 http://sourceforge.net/p/astlinux/code/8445 Author: abelbeck Date: 2017-07-16 13:24:29 +0000 (Sun, 16 Jul 2017) Log Message: ----------- web interface, Status tab, add optional 'ACME Certificates' section, show via Prefs tab Modified Paths: -------------- branches/1.0/package/webinterface/altweb/admin/prefs.php branches/1.0/package/webinterface/altweb/common/status.inc Modified: branches/1.0/package/webinterface/altweb/admin/prefs.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/prefs.php 2017-07-15 16:51:17 UTC (rev 8444) +++ branches/1.0/package/webinterface/altweb/admin/prefs.php 2017-07-16 13:24:29 UTC (rev 8445) @@ -21,6 +21,7 @@ // 12-16-2014, Added Show Monit Tab // 08-12-2015, Added Show Fossil Tab // 02-16-2017, Added Disable CLI Tab for "staff" user +// 07-16-2017, Added Show ACME Certificates // $myself = $_SERVER['PHP_SELF']; @@ -57,6 +58,10 @@ $value = 'status_show_wan_failover = no'; fwrite($fp, $value."\n"); } + if (isset($_POST['acme_certificates'])) { + $value = 'status_show_acme_certificates = yes'; + fwrite($fp, $value."\n"); + } if (! isset($_POST['ntp_sessions'])) { $value = 'status_ntp_sessions = no'; fwrite($fp, $value."\n"); @@ -592,6 +597,10 @@ putHtml('<input type="checkbox" value="wan_failover" name="wan_failover"'.$sel.' /></td><td colspan="5">Show WAN Failover Status</td></tr>'); putHtml('<tr class="dtrow1"><td style="text-align: right;">'); + $sel = (getPREFdef($global_prefs, 'status_show_acme_certificates') === 'yes') ? ' checked="checked"' : ''; + putHtml('<input type="checkbox" value="acme_certificates" name="acme_certificates"'.$sel.' /></td><td colspan="5">Show ACME Certificates</td></tr>'); + + putHtml('<tr class="dtrow1"><td style="text-align: right;">'); $sel = (getPREFdef($global_prefs, 'status_ntp_sessions') !== 'no') ? ' checked="checked"' : ''; putHtml('<input type="checkbox" value="ntp_sessions" name="ntp_sessions"'.$sel.' /></td><td colspan="5">Show NTP Time Sources</td></tr>'); putHtml('<tr class="dtrow1"><td style="text-align: right;">'); Modified: branches/1.0/package/webinterface/altweb/common/status.inc =================================================================== --- branches/1.0/package/webinterface/altweb/common/status.inc 2017-07-15 16:51:17 UTC (rev 8444) +++ branches/1.0/package/webinterface/altweb/common/status.inc 2017-07-16 13:24:29 UTC (rev 8445) @@ -38,6 +38,7 @@ // 10-14-2016, Added Check for default admin password // 12-01-2016, Added chronyc to replace ntpq // 05-15-2017, Added IPv6 Prefixes/Address +// 07-16-2017, Added ACME Certificates // // System location of OpenVPN Client logfile $OVPNCLOGFILE = '/var/log/openvpnclient-status.log'; @@ -767,6 +768,21 @@ } } +if (is_dir('/mnt/kd/acme')) { + if (getPREFdef($global_prefs, 'status_show_acme_certificates') === 'yes') { + putHtml("<h2>ACME Certificates:</h2>"); + putHtml("<pre>"); + + $output = array(); + @exec('/usr/sbin/acme-client --list', $output); + foreach ($output as $line) { + putText(rtrim($line)); + } + unset($output); + putHtml("</pre>"); + } +} + if ($daemon['chronyd'] > 0) { if (getPREFdef($global_prefs, 'status_ntp_sessions') !== 'no') { putHtml("<h2>NTP Time Sources:</h2>"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |