Fix build info

develop
Dominik Dzienia 2 months ago
parent 3232f30d2e
commit a775ca7309

@ -5,11 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.9.3] - 2025-03-19 ## [1.9.4],[1.9.3] - 2025-03-19
### Fixed ### Fixed
- Detecting mikr.us API key / hostname - Detecting mikr.us API key / hostname
- Detecting domains on old hostnames
## [1.9.2] - 2025-03-13 ## [1.9.2] - 2025-03-13

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
### version: 1.9.3 ### version: 1.9.4
# ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.# # ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.#
# Nightscout Mikr.us setup script # # Nightscout Mikr.us setup script #
@ -54,8 +54,8 @@ DISK_LOW_MAIL=5184000 # == 60 days in seconds
DISK_CRITICAL_WARNING=104857600 # == 100 MiB DISK_CRITICAL_WARNING=104857600 # == 100 MiB
DISK_CRITICAL_MAIL=604800 # == 7 days in seconds DISK_CRITICAL_MAIL=604800 # == 7 days in seconds
DOCKER_DOWN_MAIL=604800 # == 7 days in seconds DOCKER_DOWN_MAIL=604800 # == 7 days in seconds
SCRIPT_VERSION="1.9.3" #auto-update SCRIPT_VERSION="1.9.4" #auto-update
SCRIPT_BUILD_TIME="2025.03.18" #auto-update SCRIPT_BUILD_TIME="2025.03.19" #auto-update
#======================================= #=======================================
# SETUP # SETUP
@ -2321,6 +2321,13 @@ uninstall_menu() {
get_td_domain() { get_td_domain() {
local MHOST=$(hostname) local MHOST=$(hostname)
if ! [[ "$MHOST" =~ [a-zA-Z]{2,16}[0-9]{3} ]]; then
MIKRUS_APIKEY=$(cat "/klucz_api")
MIKRUS_INFO_HOST=$(curl -s -d "srv=$MIKRUS_HOST&key=$MIKRUS_APIKEY" -X POST https://api.mikr.us/info | jq -r .imie_id)
if [[ "$MIKRUS_INFO_HOST" =~ [a-zA-Z]{2,16}[0-9]{3} ]]; then
MHOST="$MIKRUS_INFO_HOST"
fi
fi
local APIKEY=$(dotenv-tool -r get -f "$ENV_FILE_ADMIN" "MIKRUS_APIKEY") local APIKEY=$(dotenv-tool -r get -f "$ENV_FILE_ADMIN" "MIKRUS_APIKEY")
curl -sd "srv=$MHOST&key=$APIKEY" https://api.mikr.us/domain | jq -r ".[].name" | grep ".ns.techdiab.pl" | head -n 1 curl -sd "srv=$MHOST&key=$APIKEY" https://api.mikr.us/domain | jq -r ".[].name" | grep ".ns.techdiab.pl" | head -n 1
} }

@ -1,6 +1,6 @@
{ {
"name": "@dlvoy/ns-installer-mikrus", "name": "@dlvoy/ns-installer-mikrus",
"version": "1.9.3", "version": "1.9.4",
"description": "Nightscout installer for mikr.us VPS", "description": "Nightscout installer for mikr.us VPS",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

@ -1 +1 @@
2025-03-18T23:21:17.503Z 2025-03-19T00:07:24.204Z
Loading…
Cancel
Save