浏览代码

md5 check fix

rufengsuixing 5 年之前
父节点
当前提交
e190df618e
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      root/usr/share/AdGuardHome/addhost.sh
  2. 1 1
      root/usr/share/AdGuardHome/gfw2adg.sh

+ 1 - 1
root/usr/share/AdGuardHome/addhost.sh

@@ -4,7 +4,7 @@ local nowmd5=$(md5sum /etc/hosts)
 nowmd5=${nowmd5%% *}
 local lastmd5=$(uci get AdGuardHome.AdGuardHome.hostsmd5 2>/dev/null)
 if [ "$nowmd5" != "$lastmd5" ]; then
-	uci get AdGuardHome.AdGuardHome.hostsmd5="$nowmd5"
+	uci set AdGuardHome.AdGuardHome.hostsmd5="$nowmd5"
 	uci commit AdGuardHome
 	[ "$1" == "noreload" ] || /etc/init.d/AdGuardHome reload
 fi

+ 1 - 1
root/usr/share/AdGuardHome/gfw2adg.sh

@@ -5,7 +5,7 @@ local nowmd5=$(md5sum /tmp/adguard.list 2>/dev/null)
 nowmd5=${nowmd5%% *}
 local lastmd5=$(uci get AdGuardHome.AdGuardHome.gfwlistmd5 2>/dev/null)
 if [ "$nowmd5" != "$lastmd5" ]; then
-	uci get AdGuardHome.AdGuardHome.gfwlistmd5="$nowmd5"
+	uci set AdGuardHome.AdGuardHome.gfwlistmd5="$nowmd5"
 	uci commit AdGuardHome
 	[ "$1" == "noreload" ] || /etc/init.d/AdGuardHome reload
 fi