From 3d67bd50b0792d7864f31df34cdb32722e857424 Mon Sep 17 00:00:00 2001 From: Dominik Dzienia Date: Tue, 6 Jan 2026 15:45:22 +0000 Subject: [PATCH] Debug release 1.10.3 --- install.sh | 35 +++++++++++++++++++++++++++++++---- package.json | 4 ++-- src/lib.sh | 4 ++-- src/logic_config.sh | 2 +- updated | 2 +- 5 files changed, 37 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 1b11f0b..cfbd497 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -### version: 1.10.2 +### version: 1.10.3 # ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.# # Nightscout Mikr.us setup script # @@ -16,7 +16,7 @@ # This file is automatically generated. Do not modify it directly! # Instead, modify the source files in the src directory and run the build script! # -# Build time: 2026.01.06 15:27 +# Build time: 2026.01.06 15:45 @@ -61,7 +61,7 @@ DISK_LOW_MAIL=5184000 # == 60 days in seconds DISK_CRITICAL_WARNING=104857600 # == 100 MiB DISK_CRITICAL_MAIL=604800 # == 7 days in seconds DOCKER_DOWN_MAIL=604800 # == 7 days in seconds -SCRIPT_VERSION="1.10.2" #auto-update +SCRIPT_VERSION="1.10.3" #auto-update SCRIPT_BUILD_TIME="2026.01.06" #auto-update FORCE_DEBUG_LOG="" NONINTERACTIVE_MODE="false" @@ -1791,6 +1791,22 @@ source_admin() { fi } +do_uninstall() { + msgok "Uninstalling..." + uninstall_containers + ohai "Usuwanie plików, proszę czekać..." + uninstall_cron + rm -r "${MONGO_DB_DIR:?}/data" + rm -r "${CONFIG_ROOT_DIR:?}" + rm "$TOOL_LINK" + rm -r "${NIGHTSCOUT_ROOT_DIR:?}/tools" + rm -r "${NIGHTSCOUT_ROOT_DIR:?}/updates" + do_cleanup_diagnostics + do_cleanup_app_logs + do_cleanup_app_state + event_mark "uninstall" +} + @@ -2800,6 +2816,7 @@ Options: -r, --restart Restart containers --update-ns Update Nightscout and Mongo containers --force-check Force update check in UI mode + --uninstall Uninstall Nightscout, containers, data, config and tool -h, --help Show this help message EOF } @@ -2810,7 +2827,7 @@ parse_commandline_args() { CMDARGS=$(getopt --quiet \ -o wvldpuc:srh \ - --long watchdog,version,loud,develop,production,update,force-check,channel:,cleanup,restart,update-ns,help \ + --long watchdog,version,loud,develop,production,update,force-check,channel:,cleanup,restart,update-ns,uninstall,help \ -n 'nightscout-tool' -- "$@") # shellcheck disable=SC2181 @@ -2889,6 +2906,12 @@ parse_commandline_args() { action="update-ns" shift ;; + --uninstall) + #shellcheck disable=SC2034 + NONINTERACTIVE_MODE=true + action="uninstall" + shift + ;; -h | --help) action="help" shift @@ -2944,6 +2967,10 @@ parse_commandline_args() { do_update_ns exit 0 ;; + uninstall) + do_uninstall + exit 0 + ;; esac if [ "$WATCHDOGMODE" = "true" ]; then diff --git a/package.json b/package.json index 80371a8..8169284 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dlvoy/ns-installer-mikrus", - "version": "1.10.2", + "version": "1.10.3", "description": "Nightscout installer for mikr.us VPS", "main": "index.js", "scripts": { @@ -8,4 +8,4 @@ }, "author": "Dominik Dzienia ", "license": "CC-BY-NC-ND-4.0" -} \ No newline at end of file +} diff --git a/src/lib.sh b/src/lib.sh index faad2bc..fa6a369 100644 --- a/src/lib.sh +++ b/src/lib.sh @@ -39,8 +39,8 @@ DISK_LOW_MAIL=5184000 # == 60 days in seconds DISK_CRITICAL_WARNING=104857600 # == 100 MiB DISK_CRITICAL_MAIL=604800 # == 7 days in seconds DOCKER_DOWN_MAIL=604800 # == 7 days in seconds -SCRIPT_VERSION="1.10.1" #auto-update -SCRIPT_BUILD_TIME="2026.01.05" #auto-update +SCRIPT_VERSION="1.10.3" #auto-update +SCRIPT_BUILD_TIME="2026.01.06" #auto-update FORCE_DEBUG_LOG="" NONINTERACTIVE_MODE="false" EXECUTED="true" diff --git a/src/logic_config.sh b/src/logic_config.sh index 5214eb0..f3d198a 100644 --- a/src/logic_config.sh +++ b/src/logic_config.sh @@ -24,7 +24,7 @@ source_admin() { do_uninstall() { msgok "Uninstalling..." uninstall_containers - ohai "Usuwanie plików, proszę czekać..." + ohai "Usuwanie plików, proszę czekać..." uninstall_cron rm -r "${MONGO_DB_DIR:?}/data" rm -r "${CONFIG_ROOT_DIR:?}" diff --git a/updated b/updated index 6bab103..7e04595 100644 --- a/updated +++ b/updated @@ -1 +1 @@ -2026-01-06T15:27:48.397Z \ No newline at end of file +2026-01-06T15:45:06.053Z \ No newline at end of file