fix(Live2D): pkill 用绝对路径 + service 加 PATH 环境变量

This commit is contained in:
2026-07-07 14:11:23 +08:00
parent 25508b4c66
commit e5a311fe3a
2 changed files with 4 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ Type=simple
User=showen User=showen
Environment=DISPLAY=:0 Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/showen/.Xauthority Environment=XAUTHORITY=/home/showen/.Xauthority
Environment=PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
WorkingDirectory=/home/showen/Showen/ShowenV2 WorkingDirectory=/home/showen/Showen/ShowenV2
ExecStart=/home/showen/Showen/ShowenV2/target/release/showen_v2 --config /home/showen/Showen/ShowenV2/configs/dog_state_machine.json ExecStart=/home/showen/Showen/ShowenV2/target/release/showen_v2 --config /home/showen/Showen/ShowenV2/configs/dog_state_machine.json
Restart=on-failure Restart=on-failure

View File

@@ -215,7 +215,7 @@ impl Plugin for VideoPlugin {
let _ = child.wait(); let _ = child.wait();
} }
// Firefox 会 fork 多个子进程child.kill() 只杀父进程,用 pkill -9 兜底 // Firefox 会 fork 多个子进程child.kill() 只杀父进程,用 pkill -9 兜底
let _ = std::process::Command::new("pkill") let _ = std::process::Command::new("/usr/bin/pkill")
.arg("-9") .arg("-9")
.arg("-f") .arg("-f")
.arg("firefox-esr") .arg("firefox-esr")
@@ -250,7 +250,7 @@ impl Plugin for VideoPlugin {
let _ = child.wait(); let _ = child.wait();
} }
// Firefox 会 fork 多个子进程child.kill() 只杀父进程,用 pkill -9 兜底 // Firefox 会 fork 多个子进程child.kill() 只杀父进程,用 pkill -9 兜底
let _ = std::process::Command::new("pkill") let _ = std::process::Command::new("/usr/bin/pkill")
.arg("-9") .arg("-9")
.arg("-f") .arg("-f")
.arg("firefox-esr") .arg("firefox-esr")
@@ -307,7 +307,7 @@ impl Plugin for VideoPlugin {
let _ = child.kill(); let _ = child.kill();
let _ = child.wait(); let _ = child.wait();
} }
let _ = std::process::Command::new("pkill") let _ = std::process::Command::new("/usr/bin/pkill")
.arg("-9") .arg("-9")
.arg("-f") .arg("-f")
.arg("firefox-esr") .arg("firefox-esr")