diff --git a/universal_config_new_podkop.sh b/universal_config_new_podkop.sh index 697007a..15c47d6 100644 --- a/universal_config_new_podkop.sh +++ b/universal_config_new_podkop.sh @@ -475,6 +475,22 @@ else is_reconfig_podkop="n" fi + +#####after test delete +DESCRIPTION=$(ubus call system board | jsonfilter -e '@.release.description') +VERSION=$(ubus call system board | jsonfilter -e '@.release.version') +findKey="RouteRich" +findVersion="24.10.2" + +if echo "$DESCRIPTION" | grep -qi -- "$findKey" && printf '%s\n%s\n' "$findVersion" "$VERSION" | sort -V | tail -n1 | grep -qx -- "$VERSION"; then + printf "\033[32;1mThis new firmware. Running scprit...\033[0m\n" +else + printf "\033[32;1mThis old firmware.\nTo use this script, update your firmware to the latest version....\033[0m\n" + exit 1 +fi +####after test delete + + echo "Update list packages..." opkg update