fix: systemd service and terminal logging cleanup
Key fixes: - Systemd service now runs as root (was openagent user) - Removed ProtectHome=true which blocked /root access - Working directory set to /root - Simplified terminal command logging
This commit is contained in:
@@ -67,7 +67,6 @@ impl Tool for RunCommand {
|
||||
let timeout_secs = args["timeout_secs"].as_u64().unwrap_or(60);
|
||||
|
||||
tracing::info!("Executing command in {:?}: {}", cwd, command);
|
||||
tracing::debug!("CWD exists: {}, is_dir: {}", cwd.exists(), cwd.is_dir());
|
||||
|
||||
// Determine shell based on OS
|
||||
let (shell, shell_arg) = if cfg!(target_os = "windows") {
|
||||
@@ -102,14 +101,8 @@ impl Tool for RunCommand {
|
||||
let stderr = String::from_utf8_lossy(&output.stderr);
|
||||
let exit_code = output.status.code().unwrap_or(-1);
|
||||
|
||||
tracing::info!("Command completed: exit={}, stdout_len={}, stderr_len={}",
|
||||
tracing::debug!("Command completed: exit={}, stdout_len={}, stderr_len={}",
|
||||
exit_code, stdout.len(), stderr.len());
|
||||
if !stdout.is_empty() && stdout.len() < 1000 {
|
||||
tracing::info!("Command stdout: {}", stdout.trim());
|
||||
}
|
||||
if !stderr.is_empty() {
|
||||
tracing::warn!("Command stderr: {}", &stderr[..stderr.len().min(500)]);
|
||||
}
|
||||
|
||||
let mut result = String::new();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user