Browse Source

Update update_core.sh

rufengsuixing 5 years ago
parent
commit
ab237280b9
1 changed files with 2 additions and 0 deletions
  1. 2 0
      root/usr/share/AdGuardHome/update_core.sh

+ 2 - 0
root/usr/share/AdGuardHome/update_core.sh

@@ -29,8 +29,10 @@ check_latest_version(){
 	if [ -f "$configpath" ]; then
 	if [ -f "$configpath" ]; then
 	now_ver="$($binpath -c $configpath --check-config 2>&1| grep -E 'v[0-9.]+' -o)"
 	now_ver="$($binpath -c $configpath --check-config 2>&1| grep -E 'v[0-9.]+' -o)"
 	else
 	else
+	if [ -f "$binpath" ]; then
 	now_ver=$(uci get AdGuardHome.AdGuardHome.version)
 	now_ver=$(uci get AdGuardHome.AdGuardHome.version)
 	fi
 	fi
+	fi
 	if [ "${latest_ver}"x != "${now_ver}"x ]; then
 	if [ "${latest_ver}"x != "${now_ver}"x ]; then
 		clean_log
 		clean_log
 		echo -e "Local version: ${now_ver}., cloud version: ${latest_ver}." >>/tmp/AdGuardHome_update.log
 		echo -e "Local version: ${now_ver}., cloud version: ${latest_ver}." >>/tmp/AdGuardHome_update.log