fix(Live2D): pkill 用绝对路径 + service 加 PATH 环境变量
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user