Skip to content

Commit

Permalink
use lib, update regex (#98)
Browse files Browse the repository at this point in the history
* better regex for librespeed

* use new lib script
  • Loading branch information
ipitio authored Apr 30, 2024
1 parent 59a782a commit c24fb4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api_speedtest.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ function getStatusCmd()
function whichSpeedtest()
{
if (file_exists('/usr/bin/speedtest')) {
$officialInstalled = speedtestExecute('SKIP_MOD=true ; . /opt/pihole/speedtestmod/mod.sh ; notInstalled speedtest && echo "false" || echo "true"')['data'];
$officialInstalled = speedtestExecute('. /opt/pihole/speedtestmod/lib.sh ; notInstalled speedtest && echo "false" || echo "true"')['data'];

if ($officialInstalled === 'true') {
return 'official';
Expand Down
2 changes: 1 addition & 1 deletion scripts/pi-hole/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ $(function () {
let lastRunText = "Latest run is unavailable";
if (lastRun) {
lastRunText = `\nLatest run:\n${lastRun
.replaceAll(/["{},]/g, "")
.replaceAll(/[[\]"{},]/g, "")
.replaceAll(/\n\s*\n/g, "\n")
.replaceAll(/^\n+|\s+$/g, "")}`;
}
Expand Down

0 comments on commit c24fb4b

Please sign in to comment.