diff -uprN web-5.21/scripts/pi-hole/php/func.php web-5.21.cust/scripts/pi-hole/php/func.php --- web-5.21/scripts/pi-hole/php/func.php 2023-11-21 21:15:32.000000000 +0100 +++ web-5.21.cust/scripts/pi-hole/php/func.php 2024-04-01 20:07:12.354152908 +0200 @@ -167,7 +167,7 @@ function pihole_execute($argument_string $escaped = escapeshellcmd($argument_string); $output = null; $return_status = -1; - $command = 'sudo pihole '.$escaped; + $command = 'sudo /usr/bin/pihole '.$escaped; exec($command, $output, $return_status); if ($return_status !== 0) { trigger_error("Executing {$command} failed.", E_USER_WARNING); diff -uprN web-5.21/scripts/pi-hole/php/gravity.sh.php web-5.21.cust/scripts/pi-hole/php/gravity.sh.php --- web-5.21/scripts/pi-hole/php/gravity.sh.php 2023-11-21 21:15:32.000000000 +0100 +++ web-5.21.cust/scripts/pi-hole/php/gravity.sh.php 2024-04-01 20:07:12.357486267 +0200 @@ -41,7 +41,7 @@ function echoEvent($datatext) echo 'data: '.implode("\ndata: ", explode("\n", $datatext))."\n\n"; } -$proc = popen('sudo pihole -g', 'r'); +$proc = popen('sudo /usr/bin/pihole -g', 'r'); while (!feof($proc)) { echoEvent(fread($proc, 4096)); } diff -uprN web-5.21/scripts/pi-hole/php/queryads.php web-5.21.cust/scripts/pi-hole/php/queryads.php --- web-5.21/scripts/pi-hole/php/queryads.php 2023-11-21 21:15:32.000000000 +0100 +++ web-5.21.cust/scripts/pi-hole/php/queryads.php 2024-04-01 20:07:12.354152908 +0200 @@ -61,7 +61,7 @@ if (isset($_GET['showall'])) { $options .= ' -all'; } -$proc = popen('sudo pihole -q '.$url.$options, 'r'); +$proc = popen('sudo /usr/bin/pihole -q '.$url.$options, 'r'); while (!feof($proc)) { echoEvent(fread($proc, 4096), $url); } diff -uprN web-5.21/scripts/pi-hole/php/savesettings.php web-5.21.cust/scripts/pi-hole/php/savesettings.php --- web-5.21/scripts/pi-hole/php/savesettings.php 2023-11-21 21:15:32.000000000 +0100 +++ web-5.21.cust/scripts/pi-hole/php/savesettings.php 2024-04-01 20:07:12.357486267 +0200 @@ -425,7 +425,7 @@ if (isset($_POST['field'])) { if (isset($_POST['webtheme'])) { global $available_themes; if (array_key_exists($_POST['webtheme'], $available_themes)) { - exec('sudo pihole -a theme '.$_POST['webtheme']); + exec('sudo /usr/bin/pihole -a theme '.$_POST['webtheme']); } } $success .= 'The webUI settings have been updated'; diff -uprN web-5.21/scripts/pi-hole/php/sidebar.php web-5.21.cust/scripts/pi-hole/php/sidebar.php --- web-5.21/scripts/pi-hole/php/sidebar.php 2023-11-21 21:15:32.000000000 +0100 +++ web-5.21.cust/scripts/pi-hole/php/sidebar.php 2024-04-01 20:07:12.320819315 +0200 @@ -248,12 +248,6 @@ Tail FTL.log - -
  • - - Generate debug log - -
  • diff -uprN web-5.21/scripts/pi-hole/php/tailLog.php web-5.21.cust/scripts/pi-hole/php/tailLog.php --- web-5.21/scripts/pi-hole/php/tailLog.php 2023-11-21 21:15:32.000000000 +0100 +++ web-5.21.cust/scripts/pi-hole/php/tailLog.php 2024-04-01 20:07:12.324152674 +0200 @@ -31,9 +31,9 @@ function formatLine($line) // usage of f-streams will be much faster for // files as large as the pihole.log if (isset($_GET['FTL'])) { - $file = fopen('/var/log/pihole/FTL.log', 'r'); + $file = fopen('/run/log/pihole-ftl/pihole-FTL.log', 'r'); } else { - $file = fopen('/var/log/pihole/pihole.log', 'r'); + $file = fopen('/run/log/pihole/pihole.log', 'r'); } if (!$file) { diff -uprN web-5.21/scripts/pi-hole/php/update_checker.php web-5.21.cust/scripts/pi-hole/php/update_checker.php --- web-5.21/scripts/pi-hole/php/update_checker.php 2023-11-21 21:15:32.000000000 +0100 +++ web-5.21.cust/scripts/pi-hole/php/update_checker.php 2024-04-01 20:07:12.350819549 +0200 @@ -15,14 +15,14 @@ $versionsfile = '/etc/pihole/versions'; if (!is_readable($versionsfile)) { $core_branch = 'master'; - $core_current = 'N/A'; + $core_current = "5.18.2"; $core_update = false; $web_branch = 'master'; - $web_current = 'N/A'; + $web_current = "5.21"; $web_update = false; - $FTL_current = 'N/A'; + $FTL_current = exec("pihole-FTL version"); $FTL_update = false; $docker_current = 'N/A'; @@ -34,28 +34,28 @@ if (!is_readable($versionsfile)) { // Check if on a dev branch $core_branch = $versions['CORE_BRANCH']; if ($core_branch !== 'master') { - $core_current = 'vDev'; + $core_current = "5.18.2"; $core_commit = $versions['CORE_VERSION']; } else { - $core_current = explode('-', $versions['CORE_VERSION'])[0]; + $core_current = "5.18.2"; } // Get Pi-hole web branch / version / commit $web_branch = $versions['WEB_BRANCH']; if ($web_branch !== 'master') { - $web_current = 'vDev'; + $web_current = "5.21"; $web_commit = $versions['WEB_VERSION']; } else { - $web_current = explode('-', $versions['WEB_VERSION'])[0]; + $web_current = "5.21"; } // Get Pi-hole FTL (not a git repository) $FTL_branch = $versions['FTL_BRANCH']; if (substr($versions['FTL_VERSION'], 0, 4) === 'vDev') { - $FTL_current = 'vDev'; + $FTL_current = exec("pihole-FTL version"); $FTL_commit = $versions['FTL_VERSION']; } else { - $FTL_current = $versions['FTL_VERSION']; + $FTL_current = exec("pihole-FTL version"); } // Get Pi-hole Docker Tag, if available @@ -100,9 +100,9 @@ if (!is_readable($versionsfile)) { } // URLs for the links -$coreUrl = 'https://github.com/pi-hole/pi-hole/releases'; -$webUrl = 'https://github.com/pi-hole/AdminLTE/releases'; -$ftlUrl = 'https://github.com/pi-hole/FTL/releases'; +$coreUrl = 'https://aur.archlinux.org/packages/pi-hole-server'; +$webUrl = 'https://aur.archlinux.org/packages/pi-hole-server'; +$ftlUrl = 'https://aur.archlinux.org/packages/pi-hole-ftl'; $dockerUrl = 'https://github.com/pi-hole/docker-pi-hole/releases'; // Version strings (encoded to avoid code execution) @@ -110,26 +110,26 @@ $dockerUrl = 'https://github.com/pi-hole if (isset($core_commit)) { $coreVersionStr = htmlentities($core_current.' ('.$core_branch.', '.$core_commit.')'); } else { - $coreVersionStr = ''.htmlentities($core_current).''; + $coreVersionStr = ''.htmlentities($core_current).''; } if (isset($web_commit)) { $webVersionStr = htmlentities($web_current.' ('.$web_branch.', '.$web_commit.')'); } else { - $webVersionStr = ''.htmlentities($web_current).''; + $webVersionStr = ''.htmlentities($web_current).''; } if (isset($FTL_commit)) { $ftlVersionStr = htmlentities($FTL_current.' ('.$FTL_branch.', '.$FTL_commit.')'); } else { - $ftlVersionStr = ''.htmlentities($FTL_current).''; + $ftlVersionStr = ''.htmlentities($FTL_current).''; } if ($docker_current) { if ($docker_current == 'dev' || $docker_current == 'nightly') { $dockerVersionStr = htmlentities($docker_current); } else { - $dockerVersionStr = ''.htmlentities($docker_current).''; + $dockerVersionStr = ''.htmlentities($docker_current).''; } } else { $dockerVersionStr = '';