From 5275f9517a7a2f45f669369797460efff94cf629 Mon Sep 17 00:00:00 2001 From: Dominik Dzienia Date: Tue, 6 Jan 2026 16:49:03 +0000 Subject: [PATCH] Debug release 1.10.5 --- install.sh | 24 +++++++++++++++--------- package.json | 2 +- src/logic_setup_checks.sh | 18 ++++++++++++------ updated | 2 +- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/install.sh b/install.sh index 64ad298..b27b6ab 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/bin/bash -### version: 1.10.4 +### version: 1.10.5 # ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.# # 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 16:35 +# Build time: 2026.01.06 16:48 @@ -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.4" #auto-update +SCRIPT_VERSION="1.10.5" #auto-update SCRIPT_BUILD_TIME="2026.01.06" #auto-update FORCE_DEBUG_LOG="" NONINTERACTIVE_MODE="false" @@ -1121,14 +1121,21 @@ add_if_not_ok_cmd() { } add_if_not_ok_compose() { + #shellcheck disable=SC2319 local RESULT=$? + if [ "$#" -eq 2 ]; then + RESULT=$2 + fi + if [ "$RESULT" -eq 0 ]; then msgcheck "$1 installed" else ohai "Installing $1..." - mkdir -p "~/.docker/cli-plugins" >>"$LOGTO" 2>&1 - curl -SL "https://github.com/docker/compose/releases/download/v2.29.7/docker-compose-linux-x86_64" -o "~/.docker/cli-plugins/docker-compose" >>"$LOGTO" 2>&1 - chmod +x "~/.docker/cli-plugins/docker-compose" >>"$LOGTO" 2>&1 + { + mkdir -p "$HOME/.docker/cli-plugins" + curl -SL "https://github.com/docker/compose/releases/download/v2.29.7/docker-compose-linux-x86_64" -o "$HOME/.docker/cli-plugins/docker-compose" + } >>"$LOGTO" 2>&1 + chmod +x "$HOME/.docker/cli-plugins/docker-compose" >>"$LOGTO" 2>&1 msgcheck "Installing $1 successfull" fi } @@ -1151,11 +1158,10 @@ check_docker() { check_docker_compose() { local version_output - version_output="$(docker compose version)" + version_output="$(docker compose version 2>&1)" # check if output has 'unknown' in it if [[ "$version_output" == *"unknown"* ]]; then - $?=-1 - add_if_not_ok_compose "Docker compose" + add_if_not_ok_compose "Docker compose" "force" else msgcheck "Docker compose installed" fi diff --git a/package.json b/package.json index e312318..3191216 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dlvoy/ns-installer-mikrus", - "version": "1.10.4", + "version": "1.10.5", "description": "Nightscout installer for mikr.us VPS", "main": "index.js", "scripts": { diff --git a/src/logic_setup_checks.sh b/src/logic_setup_checks.sh index 49e1b91..d294d37 100644 --- a/src/logic_setup_checks.sh +++ b/src/logic_setup_checks.sh @@ -35,14 +35,21 @@ add_if_not_ok_cmd() { } add_if_not_ok_compose() { + #shellcheck disable=SC2319 local RESULT=$? + if [ "$#" -eq 2 ]; then + RESULT=$2 + fi + if [ "$RESULT" -eq 0 ]; then msgcheck "$1 installed" else ohai "Installing $1..." - mkdir -p "~/.docker/cli-plugins" >>"$LOGTO" 2>&1 - curl -SL "https://github.com/docker/compose/releases/download/v2.29.7/docker-compose-linux-x86_64" -o "~/.docker/cli-plugins/docker-compose" >>"$LOGTO" 2>&1 - chmod +x "~/.docker/cli-plugins/docker-compose" >>"$LOGTO" 2>&1 + { + mkdir -p "$HOME/.docker/cli-plugins" + curl -SL "https://github.com/docker/compose/releases/download/v2.29.7/docker-compose-linux-x86_64" -o "$HOME/.docker/cli-plugins/docker-compose" + } >>"$LOGTO" 2>&1 + chmod +x "$HOME/.docker/cli-plugins/docker-compose" >>"$LOGTO" 2>&1 msgcheck "Installing $1 successfull" fi } @@ -65,11 +72,10 @@ check_docker() { check_docker_compose() { local version_output - version_output="$(docker compose version)" + version_output="$(docker compose version 2>&1)" # check if output has 'unknown' in it if [[ "$version_output" == *"unknown"* ]]; then - $?=-1 - add_if_not_ok_compose "Docker compose" + add_if_not_ok_compose "Docker compose" "force" else msgcheck "Docker compose installed" fi diff --git a/updated b/updated index 9d21b04..364a9e3 100644 --- a/updated +++ b/updated @@ -1 +1 @@ -2026-01-06T16:35:48.974Z \ No newline at end of file +2026-01-06T16:48:37.571Z \ No newline at end of file