软路由系统中AdGuardHome 更新core,提示A task is already running 解决方法

使用此方法解决:https://github.com/rufengsuixing/luci-app-adguardhome/issues/71

手动把/usr/share/AdGuardHome/update_core.sh下相关代码修改!

在执行校验查询前增加sleep
check_if_already_running(){
sleep 1     此处就是增加的
running_tasks=”$(ps |grep ‘AdGuardHome’ |grep ‘update_core’ |grep -v ‘grep’ |
[ “${running_tasks}” -gt “2” ] && echo -e “\nA task is already running.” &&   后面代码省略

check_if_already_running(){
sleep 1 
running_tasks="$(ps |grep 'AdGuardHome' |grep 'update_core' |grep -v 'grep' |
[ "${running_tasks}" -gt "2" ] && echo -e "\nA task is already running." &&   后面代码省略

初缘的分享随手笔记

小米(红米)电视屏蔽开机广告hosts

2021-11-27 19:54:53

VPS初缘的分享随手笔记

[VPS相关脚本收集] 常用脚本备份

2021-11-30 11:15:30

搜索