Skip to content

Commit 02e8e71

Browse files
committed
🚧 pages: check all systemd targets
1 parent 0b1f4bf commit 02e8e71

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/pages.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,9 @@ fn toggle_service(
850850
let units_handle = if action_type == "user_service" { &G_GLOBAL_UNITS } else { &G_LOCAL_UNITS }
851851
.lock()
852852
.unwrap();
853-
let cmd = if !units_handle.enabled_units.contains(&String::from(action_data)) {
853+
854+
let action_enabled = action_data.split(' ').all(|x| units_handle.enabled_units.contains(&x.to_owned()));
855+
let cmd = if !action_enabled {
854856
if action_type == "user_service" {
855857
format!("systemctl --user enable --now --force {action_data}")
856858
} else {

0 commit comments

Comments
 (0)