fix: implement actual system reboot via shutdown/systemctl commands
- Fix reboot_system() to use shutdown -r +N for delayed reboots - Fix patches handler to call reboot_system() instead of just logging - Add CAP_SYS_BOOT capability to systemd service for LXC reboot support - Remove unused warn import from packages/mod.rs - Bump version to 0.3.1
This commit is contained in:
@ -139,7 +139,22 @@ pub async fn apply_patches(
|
||||
),
|
||||
)
|
||||
.await;
|
||||
// In production, would trigger actual reboot via system handler
|
||||
// Trigger actual reboot via system handler
|
||||
match backend_clone.reboot_system(request.reboot_delay_seconds) {
|
||||
Ok(_) => {
|
||||
let _ = job_manager_clone
|
||||
.add_job_log(
|
||||
&job_id_clone,
|
||||
"Reboot command executed".to_string(),
|
||||
)
|
||||
.await;
|
||||
}
|
||||
Err(e) => {
|
||||
let _ = job_manager_clone
|
||||
.add_job_log(&job_id_clone, format!("Reboot failed: {}", e))
|
||||
.await;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user