mirror of
https://github.com/DeNNiiInc/UltyScan.git
synced 2026-04-17 18:26:00 +00:00
Fix sudo bash command and preserve console output
This commit is contained in:
@@ -229,8 +229,9 @@ async function checkScanStatus() {
|
||||
stopStatusPolling();
|
||||
}
|
||||
|
||||
// Update console with log content
|
||||
if (consoleOutput && (result.logContent || result.workspaceOutput)) {
|
||||
// Update console with log content - only if there's actual content
|
||||
if (consoleOutput) {
|
||||
if (result.logContent || result.workspaceOutput) {
|
||||
let output = "UltyScan Console\n";
|
||||
output += "================\n";
|
||||
if (result.latestLogFile) {
|
||||
@@ -248,6 +249,8 @@ async function checkScanStatus() {
|
||||
consoleOutput.textContent = output;
|
||||
consoleOutput.scrollTop = consoleOutput.scrollHeight;
|
||||
}
|
||||
// Don't clear console if there's no log content - keep existing content
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Status check failed:", error);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
|
||||
}
|
||||
|
||||
// Configuration
|
||||
define('SNIPER_PATH', 'sudo /usr/share/sniper/sniper');
|
||||
define('SNIPER_PATH', 'sudo bash /usr/share/sniper/sniper');
|
||||
define('LOG_DIR', '/var/log/ultyscan');
|
||||
|
||||
// Ensure log directory exists
|
||||
|
||||
Reference in New Issue
Block a user