去除FFMPEG后端
This commit is contained in:
18
run.sh
Executable file
18
run.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 获取当前脚本的 PID
|
||||
SELF_PID=$$
|
||||
|
||||
echo "【1/3】终止其他 run.sh(跳过自身 PID=$SELF_PID)..."
|
||||
# 使用 pgrep + grep -v 排除自己
|
||||
pgrep -f "run.sh" | grep -v "^$SELF_PID$" | xargs kill -9 2>/dev/null
|
||||
|
||||
echo "【2/3】终止 run_live_demo.py ..."
|
||||
pkill -9 -f "run_live_demo.py" 2>/dev/null
|
||||
|
||||
sleep 1
|
||||
|
||||
|
||||
echo "【3/3】启动新实例..."
|
||||
exec python3 ./run_live_demo.py
|
||||
|
||||
Reference in New Issue
Block a user