diff --git a/scripts/showen_v2.service b/scripts/showen_v2.service index 1a7d60c..76c847c 100644 --- a/scripts/showen_v2.service +++ b/scripts/showen_v2.service @@ -8,6 +8,7 @@ Type=simple User=showen Environment=DISPLAY=:0 Environment=XAUTHORITY=/home/showen/.Xauthority +Environment=PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin WorkingDirectory=/home/showen/Showen/ShowenV2 ExecStart=/home/showen/Showen/ShowenV2/target/release/showen_v2 --config /home/showen/Showen/ShowenV2/configs/dog_state_machine.json Restart=on-failure diff --git a/src/plugins/video/mod.rs b/src/plugins/video/mod.rs index 2385eb9..cd8b01b 100644 --- a/src/plugins/video/mod.rs +++ b/src/plugins/video/mod.rs @@ -215,7 +215,7 @@ impl Plugin for VideoPlugin { let _ = child.wait(); } // Firefox 会 fork 多个子进程,child.kill() 只杀父进程,用 pkill -9 兜底 - let _ = std::process::Command::new("pkill") + let _ = std::process::Command::new("/usr/bin/pkill") .arg("-9") .arg("-f") .arg("firefox-esr") @@ -250,7 +250,7 @@ impl Plugin for VideoPlugin { let _ = child.wait(); } // Firefox 会 fork 多个子进程,child.kill() 只杀父进程,用 pkill -9 兜底 - let _ = std::process::Command::new("pkill") + let _ = std::process::Command::new("/usr/bin/pkill") .arg("-9") .arg("-f") .arg("firefox-esr") @@ -307,7 +307,7 @@ impl Plugin for VideoPlugin { let _ = child.kill(); let _ = child.wait(); } - let _ = std::process::Command::new("pkill") + let _ = std::process::Command::new("/usr/bin/pkill") .arg("-9") .arg("-f") .arg("firefox-esr")