From cbdc5a11e54d9c474f9a5e26327b36aae5ed3c3d Mon Sep 17 00:00:00 2001 From: billz Date: Mon, 26 Sep 2022 20:53:06 +0100 Subject: [PATCH 1/9] Initial commit --- ajax/logging/clearlog.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ajax/logging/clearlog.php diff --git a/ajax/logging/clearlog.php b/ajax/logging/clearlog.php new file mode 100644 index 00000000..a798bb3c --- /dev/null +++ b/ajax/logging/clearlog.php @@ -0,0 +1,12 @@ + Date: Mon, 26 Sep 2022 20:54:12 +0100 Subject: [PATCH 2/9] Add js-clearhostapd-log ajax handler --- app/js/custom.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/js/custom.js b/app/js/custom.js index 0e842ebf..f9217a6e 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -122,6 +122,13 @@ $(document).on("click", "#gen_wpa_passphrase", function(e) { $('#txtwpapassphrase').val(genPassword(63)); }); +$(document).on("click", "#js-clearhostapd-log", function(e) { + $.post('ajax/logging/clearlog.php?',{'svc':'hostapd'},function(data){ + jsonData = JSON.parse(data); + $("#hostapd-log").val(""); + }); +}); + // Enable Bootstrap tooltips $(function () { $('[data-toggle="tooltip"]').tooltip() From 1680c43c3e0bb60f4bc371e77f211c67ddd414b3 Mon Sep 17 00:00:00 2001 From: billz Date: Mon, 26 Sep 2022 20:54:29 +0100 Subject: [PATCH 3/9] Add /bin/truncate to sudoers --- installers/raspap.sudoers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/raspap.sudoers b/installers/raspap.sudoers index 000f8057..094af055 100644 --- a/installers/raspap.sudoers +++ b/installers/raspap.sudoers @@ -63,4 +63,4 @@ www-data ALL=(ALL) NOPASSWD:/bin/cat /etc/wireguard/wg-*.key www-data ALL=(ALL) NOPASSWD:/bin/rm /etc/wireguard/*.conf www-data ALL=(ALL) NOPASSWD:/bin/rm /etc/wireguard/wg-*.key www-data ALL=(ALL) NOPASSWD:/usr/sbin/netplan - +www-data ALL=(ALL) NOPASSWD:/bin/truncate -s 0 /tmp/*.log From 52553f323ba1f820fe2cb05cde7fc5c1f413c890 Mon Sep 17 00:00:00 2001 From: billz Date: Mon, 26 Sep 2022 20:54:52 +0100 Subject: [PATCH 4/9] Update template w/ clear log btn --- templates/hostapd/logging.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/hostapd/logging.php b/templates/hostapd/logging.php index fa83395b..0994f88e 100644 --- a/templates/hostapd/logging.php +++ b/templates/hostapd/logging.php @@ -6,7 +6,8 @@
/> - + + " />
@@ -15,7 +16,7 @@ if ($arrHostapdConf['LogEnable'] == 1) { exec('sudo /bin/chmod o+r /tmp/hostapd.log'); $log = file_get_contents('/tmp/hostapd.log'); - echo ''; + echo ''; } else { echo ''; } From e57012679e3a08307a4d3d35857ed2774ef19f4f Mon Sep 17 00:00:00 2001 From: billz Date: Mon, 26 Sep 2022 20:57:57 +0100 Subject: [PATCH 5/9] Update en_US locale + compile .mo --- locale/en_US/LC_MESSAGES/messages.mo | Bin 31057 -> 31093 bytes locale/en_US/LC_MESSAGES/messages.po | 3 +++ 2 files changed, 3 insertions(+) diff --git a/locale/en_US/LC_MESSAGES/messages.mo b/locale/en_US/LC_MESSAGES/messages.mo index 703307ef8c8d5c280183c231012a55e26b511a6e..59b6739d4af16ff4e83db9529c24eeb1d9dc3fb5 100644 GIT binary patch delta 8527 zcmY+}3w+P@9>?+TTxMp5Z8kIJKbP5NGGmzgb#t5BT;^^xYA&O>-+tsarCiokD5-Q3 z9hM@gRJu?~k&>iTPA-Km#wpJ0{r`SF9-ZIA=l}eEKflZO`uqQ>qgMm|xEkP{4lDPt z;dmgxm|D0r#F*M;jJa4tS!2e;8IypyI0f&+P`r*l4617kx0pnX!WI~WeO!GA_NHEd zeerb+!;pH$R5HdhbtuG;XoO`k6RTq{)B|&|0?xrmT#RbqF|3B0u`8Bf9V|s2Y--du zCIahYWlYBgn28#|WQ?MHGoM0j5)Yv|vdeh{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~_2Ot%d!NB%P>_|S~?onamA zQHUZj6V=nj7>%p34!(?mS> zG8JRcn?pelUXHrpMQn|mF$2Ft{R)Q6vK>l8EkSG4CTx#ts1s@+#i$p}2-G|NF6@nK zT)i5zsYlHA>6ttVx?vJ(#1*K`v}X!MD$RPUMrn0ly{KK4ua1I|v;CPR-CT%CGveYzxX=DHpr* zN>@;37nsd@i?V<$@h2V36x);JOK44ypAgt z^BAtuPSsIJq`C{X_%ilmEV*APrV#&d`88NcY$C3@+yh*y9nfM8j zPrONNASMv^xb{sF7i}k@H&%0EI$_97fea!{b&hiP&?skna!p-X=k<<%n+S8cawRze ziB3c}Lcbq6GPtIhc7cwmSc{lKM7vx|+{?LvuI{^#k2ci15wVn)5`Pg(2)(ASAN)S~ zexPo0i6LCy!#!s>j&Nl=|6G(n;+N}p({2@8fn@#3kYQGUDi06sdiSfks!{6QY5{WyB6~rW$n}uhnA0`Tj=`P;{ z7gLWX-XV1KBiE65l=8i}j<=HUL?1pIkhsxTv;X$>cV)5rZ{qdWFnWii_p;vXA-4; Date: Tue, 27 Sep 2022 11:46:59 +0200 Subject: [PATCH 6/9] Apply functionality to dnsmasq log --- ajax/logging/clearlog.php | 8 ++++---- app/js/custom.js | 9 ++++++++- installers/raspap.sudoers | 2 +- templates/dhcp/logging.php | 5 +++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/ajax/logging/clearlog.php b/ajax/logging/clearlog.php index a798bb3c..cfab253b 100644 --- a/ajax/logging/clearlog.php +++ b/ajax/logging/clearlog.php @@ -3,10 +3,10 @@ require_once '../../includes/config.php'; require_once '../../includes/functions.php'; -if (isset($_POST['svc'])) { - $tmplog = '/tmp/' .$_POST['svc']. '.log'; +if (isset($_POST['logfile'])) { + $logfile = $_POST['logfile']; - // clear log for requested service - exec("sudo truncate -s 0 $tmplog", $return); + // truncate requested log file + exec("sudo truncate -s 0 $logfile", $return); echo json_encode($return); } diff --git a/app/js/custom.js b/app/js/custom.js index f9217a6e..e0ede530 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -123,12 +123,19 @@ $(document).on("click", "#gen_wpa_passphrase", function(e) { }); $(document).on("click", "#js-clearhostapd-log", function(e) { - $.post('ajax/logging/clearlog.php?',{'svc':'hostapd'},function(data){ + $.post('ajax/logging/clearlog.php?',{'logfile':'/tmp/hostapd.log'},function(data){ jsonData = JSON.parse(data); $("#hostapd-log").val(""); }); }); +$(document).on("click", "#js-cleardnsmasq-log", function(e) { + $.post('ajax/logging/clearlog.php?',{'logfile':'/var/log/dnsmasq.log'},function(data){ + jsonData = JSON.parse(data); + $("#dnsmasq-log").val(""); + }); +}); + // Enable Bootstrap tooltips $(function () { $('[data-toggle="tooltip"]').tooltip() diff --git a/installers/raspap.sudoers b/installers/raspap.sudoers index 094af055..8e7b3e72 100644 --- a/installers/raspap.sudoers +++ b/installers/raspap.sudoers @@ -63,4 +63,4 @@ www-data ALL=(ALL) NOPASSWD:/bin/cat /etc/wireguard/wg-*.key www-data ALL=(ALL) NOPASSWD:/bin/rm /etc/wireguard/*.conf www-data ALL=(ALL) NOPASSWD:/bin/rm /etc/wireguard/wg-*.key www-data ALL=(ALL) NOPASSWD:/usr/sbin/netplan -www-data ALL=(ALL) NOPASSWD:/bin/truncate -s 0 /tmp/*.log +www-data ALL=(ALL) NOPASSWD:/bin/truncate -s 0 /tmp/*.log,/bin/truncate -s 0 /var/log/dnsmasq.log diff --git a/templates/dhcp/logging.php b/templates/dhcp/logging.php index ca54a30b..0541e592 100644 --- a/templates/dhcp/logging.php +++ b/templates/dhcp/logging.php @@ -9,7 +9,8 @@

aria-describedby="log-dhcp-queries"> - + + " />
@@ -18,7 +19,7 @@ if ($conf['log-dhcp'] == 1 || $conf['log-queries'] == 1) { exec('sudo /bin/chmod o+r '.RASPI_DHCPCD_LOG); $log = file_get_contents(RASPI_DHCPCD_LOG); - echo ''; + echo ''; } else { echo ''; } From 729adf7e711b8d122e558829808a1a252ac77f3d Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 27 Sep 2022 12:03:40 +0200 Subject: [PATCH 7/9] Update dhcp/dnsmasq logging help text --- locale/en_US/LC_MESSAGES/messages.mo | Bin 31093 -> 31159 bytes locale/en_US/LC_MESSAGES/messages.po | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/en_US/LC_MESSAGES/messages.mo b/locale/en_US/LC_MESSAGES/messages.mo index 59b6739d4af16ff4e83db9529c24eeb1d9dc3fb5..f8d9ba406d1a84858ffd91f9c2a1be8fa9760dac 100644 GIT binary patch delta 5557 zcmb8yi+|789mnyLxFqBzLLx3nT#|@eT#_M+5K5>hX$XRZhKbuRh+Cw5X)~v#CJ-@dOJcuyN+zUa<>e#Z3dVa#Hhy^@VNfWN}=nBUWw5qJP6-~;T3<9b;);sW|7 zF#!AbHYN-+F&uNS85Ut1T!dZl#oopjQlH~y*X{|go1 zJyhT!sm8=%Br5a1sQCtBOB{w;a54ttOy?p@pugIqp@{c5PdWdMRMQ0h$X-uFl`bEZ z*%EAzm8ifEV@o`aq4*DMfmbmS@1rW&ysxc9C)Bu?LPI4QiOQ%DJ7Y0+z)h$H-bQ71 z3>)ExsQW)gO>_>mz&EIj>roj7a!{0cGAe;|)b$C-nea>z4L!IBb!gV0GI$9a;BM4j zS2^E7osHwDi9U1VS5X0e>-s;SwyIHoTZvYvE$WU6I29YSzR9Mcg>z987NH{cVQVZ$ zW%?2-qn)UUK0;Nl8dd7c&bz1ug42xYh#j#NW}y4v2=%JErjhu@I^LzK>hXLvkYj$ z^{A3=#u@mg8xPK~;}NJ#5}keBcowRplTZoG!p`V(s)mS4>6SFbx%8DJqlaP?dNAmH7@-Kznc;9>F*a9b^MZM!lvfsD<-TTV05ncdkc6 z6O`jBT#uSKIMW6Yg$ghU^&0j?-Jj{kbDV{!J)MWDU>WNE4X8x6q2{SV&3_mbhVq45}mZB>4B5F&wqn_W1`am7PXgp=dJ#(3c z7Oq1@+;9j#Krj@a!r?d!x1sK6VMdF8Me`Dga=Uj=@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!dcEX)fT~pZV!NeJpq}r7`atzZy}sj`#@YY5G=dpeiHf)!Q*kSf$J3aBF-z=y z1vr#`F%H8j9E}Y)8wVHLKS18ZO!~KR6!u$ce_gM_9Qu!Orr!S?j;a=_M*bO}WwvCc z&J7sG_%Bg`?!$0Ah9P(kRgu4=z880}D+ZL>d3vJWmZ7K$W}qrC3B7u70gZ56j=FIp zYD+3G0(YV&u0~z|6qE5h#$k&x`&+OVDxeJ17EDDQ!kMUb=AaT;jQY;JQpW!48~e)( WV|`*P*5*godhcpcd and dnsmasq activity." +msgstr "Enable these options to log dhcpcd and dnsmasq activity." msgid "Log DHCP requests" msgstr "Log DHCP requests" From 5d0454f96e162f5c2be472f962ce2d4164b3ea0f Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 27 Sep 2022 12:04:29 +0200 Subject: [PATCH 8/9] Update svg logging label --- templates/dhcp/logging.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/dhcp/logging.php b/templates/dhcp/logging.php index 0541e592..6050e102 100644 --- a/templates/dhcp/logging.php +++ b/templates/dhcp/logging.php @@ -1,7 +1,7 @@

-

+

dhcpcd and dnsmasq activity.") ?>

aria-describedby="log-dhcp-requests"> From b1870d40e8ab18aa46339aa0955877406115e57a Mon Sep 17 00:00:00 2001 From: billz Date: Tue, 27 Sep 2022 12:04:54 +0200 Subject: [PATCH 9/9] Apply functionality to openvpn log --- app/js/custom.js | 8 ++++++++ templates/openvpn/logging.php | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/js/custom.js b/app/js/custom.js index e0ede530..6483614b 100644 --- a/app/js/custom.js +++ b/app/js/custom.js @@ -136,6 +136,14 @@ $(document).on("click", "#js-cleardnsmasq-log", function(e) { }); }); +$(document).on("click", "#js-clearopenvpn-log", function(e) { + $.post('ajax/logging/clearlog.php?',{'logfile':'/tmp/openvpn.log'},function(data){ + jsonData = JSON.parse(data); + $("#openvpn-log").val(""); + }); +}); + + // Enable Bootstrap tooltips $(function () { $('[data-toggle="tooltip"]').tooltip() diff --git a/templates/openvpn/logging.php b/templates/openvpn/logging.php index 0aef4217..3d74b0e5 100644 --- a/templates/openvpn/logging.php +++ b/templates/openvpn/logging.php @@ -5,11 +5,12 @@
aria-describedby="log-openvpn"> - + + " />
- +