From 3e543ba7c0dc208cf1a15e54551619a76af19eed Mon Sep 17 00:00:00 2001 From: Martinski4GitHub <119833648+Martinski4GitHub@users.noreply.github.com> Date: Sun, 25 Jan 2026 23:59:38 -0800 Subject: [PATCH 1/4] Code Improvements. Minor code improvements. --- README.md | 4 ++-- uiDivStats.sh | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 6475539..ade5ab5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # uiDivStats - WebUI for Diversion statistics -## v4.0.14 -### Updated on 2026-Jan-19 +## v4.0.15 +### Updated on 2026-Jan-25 ## About A graphical representation of domain blocking performed by Diversion. diff --git a/uiDivStats.sh b/uiDivStats.sh index ade51df..e9f7307 100644 --- a/uiDivStats.sh +++ b/uiDivStats.sh @@ -13,7 +13,7 @@ ## Forked from https://github.com/jackyaz/uiDivStats ## ## ## ################################################################### -# Last Modified: 2026-Jan-19 +# Last Modified: 2026-Jan-25 #------------------------------------------------------------------ ################# Shellcheck directives ############### @@ -35,8 +35,8 @@ ### Start of script variables ### readonly SCRIPT_NAME="uiDivStats" -readonly SCRIPT_VERSION="v4.0.14" -readonly SCRIPT_VERSTAG="26011900" +readonly SCRIPT_VERSION="v4.0.15" +readonly SCRIPT_VERSTAG="26012522" SCRIPT_BRANCH="develop" SCRIPT_REPO="https://raw.githubusercontent.com/AMTM-OSR/$SCRIPT_NAME/$SCRIPT_BRANCH" readonly SCRIPT_DIR="/jffs/addons/$SCRIPT_NAME.d" @@ -3040,7 +3040,7 @@ Check_Requirements() if ! /opt/bin/grep -q '^log-facility=/opt/var/log/dnsmasq.log' /etc/dnsmasq.conf then Print_Output false "Diversion logging not enabled!" "$ERR" - Print_Output false "Open Diversion and use option l to enable logging" + Print_Output false "Open Diversion and use option l to enable logging" "$WARN" CHECKSFAILED="true" fi fi @@ -3078,7 +3078,7 @@ Menu_Install() if ! Check_Requirements then Print_Output false "Requirements for $SCRIPT_NAME not met, please see above for the reason(s)" "$CRIT" - PressEnter + PressEnter ; echo Clear_Lock rm -f "/jffs/scripts/$SCRIPT_NAME" 2>/dev/null exit 1 From 7332df63fd141cfa9b0d2c7cc08993fd45d1b7d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:56:55 +0000 Subject: [PATCH 2/4] Bump actions/checkout from 6.0.1 to 6.0.2 in the all-actions group Bumps the all-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 6.0.1 to 6.0.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6.0.1...v6.0.2) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/Create-NewReleases.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Create-NewReleases.yml b/.github/workflows/Create-NewReleases.yml index 7410a9e..adee357 100644 --- a/.github/workflows/Create-NewReleases.yml +++ b/.github/workflows/Create-NewReleases.yml @@ -19,7 +19,7 @@ jobs: steps: # 1--- Check out master so we tag the exact merge commit - name: Checkout source code - uses: actions/checkout@v6.0.1 + uses: actions/checkout@v6.0.2 with: fetch-depth: 0 ref: 'master' From e9c29c9fd09400c93e4c6d5e7768963630e6d4e5 Mon Sep 17 00:00:00 2001 From: Martinski4GitHub <119833648+Martinski4GitHub@users.noreply.github.com> Date: Wed, 18 Feb 2026 00:58:56 -0800 Subject: [PATCH 3/4] New Functionality Initial code to support automatic script updates via AMTM. --- README.md | 2 +- uiDivStats.sh | 46 ++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ade5ab5..cb56fe6 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # uiDivStats - WebUI for Diversion statistics ## v4.0.15 -### Updated on 2026-Jan-25 +### Updated on 2026-Feb-18 ## About A graphical representation of domain blocking performed by Diversion. diff --git a/uiDivStats.sh b/uiDivStats.sh index e9f7307..c25320a 100644 --- a/uiDivStats.sh +++ b/uiDivStats.sh @@ -13,7 +13,7 @@ ## Forked from https://github.com/jackyaz/uiDivStats ## ## ## ################################################################### -# Last Modified: 2026-Jan-25 +# Last Modified: 2026-Feb-18 #------------------------------------------------------------------ ################# Shellcheck directives ############### @@ -36,7 +36,7 @@ ### Start of script variables ### readonly SCRIPT_NAME="uiDivStats" readonly SCRIPT_VERSION="v4.0.15" -readonly SCRIPT_VERSTAG="26012522" +readonly SCRIPT_VERSTAG="26021800" SCRIPT_BRANCH="develop" SCRIPT_REPO="https://raw.githubusercontent.com/AMTM-OSR/$SCRIPT_NAME/$SCRIPT_BRANCH" readonly SCRIPT_DIR="/jffs/addons/$SCRIPT_NAME.d" @@ -72,6 +72,9 @@ readonly branchxStr_TAG="[Branch: $SCRIPT_BRANCH]" readonly versionDev_TAG="${SCRIPT_VERSION}_${SCRIPT_VERSTAG}" readonly versionMod_TAG="$SCRIPT_VERSION on $ROUTER_MODEL" +# To support automatic script updates from AMTM # +doScriptUpdateFromAMTM=true + readonly oneKByte=1024 readonly oneMByte=1048576 readonly oneGByte=1073741824 @@ -297,9 +300,11 @@ Update_Version() localver="$(echo "$updatecheckresult" | cut -f2 -d',')" serverver="$(echo "$updatecheckresult" | cut -f3 -d',')" - if [ "$isupdate" = "version" ]; then + if [ "$isupdate" = "version" ] + then Print_Output true "New version of $SCRIPT_NAME available - $serverver" "$PASS" - elif [ "$isupdate" = "md5" ]; then + elif [ "$isupdate" = "md5" ] + then Print_Output true "MD5 hash of $SCRIPT_NAME does not match - hotfix available - $serverver" "$PASS" fi @@ -360,6 +365,23 @@ Update_Version() fi } +##-------------------------------------## +## Added by Martinski W. [2026-Feb-18] ## +##-------------------------------------## +ScriptUpdateFromAMTM() +{ + if ! "$doScriptUpdateFromAMTM" + then + printf "Automatic script updates via AMTM are currently disabled.\n\n" + return 1 + fi + if [ $# -gt 0 ] && [ "$1" = "check" ] + then return 0 + fi + Update_Version force unattended + return "$?" +} + Update_File() { if [ "$1" = "uidivstats_www.asp" ] @@ -2954,7 +2976,8 @@ MainMenu() ;; u) printf "\n" - if Check_Lock menu; then + if Check_Lock menu + then Update_Version Clear_Lock fi @@ -2963,7 +2986,8 @@ MainMenu() ;; uf) printf "\n" - if Check_Lock menu; then + if Check_Lock menu + then Update_Version force Clear_Lock fi @@ -2985,7 +3009,8 @@ MainMenu() exit 0 ;; z) - while true; do + while true + do printf "\\n${BOLD}Are you sure you want to uninstall %s? (y/n)${CLEARFORMAT} " "$SCRIPT_NAME" read -r confirm case "$confirm" in @@ -3596,7 +3621,7 @@ then fi ##----------------------------------------## -## Modified by Martinski W. [2024-Dec-21] ## +## Modified by Martinski W. [2026-Feb-18] ## ##----------------------------------------## case "$1" in install) @@ -3699,6 +3724,11 @@ case "$1" in Update_Version force unattended exit 0 ;; + amtmupdate) + shift + ScriptUpdateFromAMTM "$@" + exit "$?" + ;; setversion) Set_Version_Custom_Settings local "$SCRIPT_VERSION" Set_Version_Custom_Settings server "$SCRIPT_VERSION" From 01992f20c8ca14002bd7b33f683dafe5f2ff3294 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 11:13:17 +0000 Subject: [PATCH 4/4] Bump softprops/action-gh-release in the all-actions group Bumps the all-actions group with 1 update: [softprops/action-gh-release](https://github.com/softprops/action-gh-release). Updates `softprops/action-gh-release` from 2.5.0 to 2.6.1 - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/v2.5.0...v2.6.1) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-version: 2.6.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/Create-NewReleases.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Create-NewReleases.yml b/.github/workflows/Create-NewReleases.yml index adee357..b58aa5e 100644 --- a/.github/workflows/Create-NewReleases.yml +++ b/.github/workflows/Create-NewReleases.yml @@ -97,7 +97,7 @@ jobs: # 7--- Publish a GitHub Release with auto-generated notes - name: Create Release with Automated Release Notes - uses: softprops/action-gh-release@v2.5.0 + uses: softprops/action-gh-release@v2.6.1 with: token: ${{ secrets.GITHUB_TOKEN }} tag_name: ${{ steps.nextver.outputs.tag }}