mirror of
https://github.com/pi-hole/web.git
synced 2026-04-23 02:09:58 +01:00
Add the new "integrity check" option to debug log page
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
@@ -49,12 +49,21 @@ function echoEvent($datatext) {
|
||||
}
|
||||
}
|
||||
|
||||
// Execute "pihole" using Web option
|
||||
$command = "export TERM=dumb && sudo pihole -d -w";
|
||||
|
||||
// Add auto-upload option
|
||||
if (isset($_GET["upload"])) {
|
||||
$proc = popen("export TERM=dumb && sudo pihole -d -a -w", "r");
|
||||
} else {
|
||||
$proc = popen("export TERM=dumb && sudo pihole -d -w", "r");
|
||||
$command .= " -a";
|
||||
}
|
||||
|
||||
// Execute database integrity_check
|
||||
if (isset($_GET["dbcheck"])) {
|
||||
$command .= " -c";
|
||||
}
|
||||
|
||||
$proc = popen($command, "r");
|
||||
|
||||
while (!feof($proc)) {
|
||||
echoEvent(fread($proc, 4096));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user