More robust defoult NS config

profanity
Dominik Dzienia 2 years ago
parent 628405dfc4
commit 0e325bf140

@ -1,6 +1,6 @@
#!/bin/bash
### version: 1.4.0
### version: 1.5.0
# ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.#
# Nightscout Mikr.us setup script #
@ -33,8 +33,8 @@ MONGO_DB_DIR=/srv/nightscout/data/mongodb
TOOL_FILE=/srv/nightscout/tools/nightscout-tool
TOOL_LINK=/usr/bin/nightscout-tool
UPDATES_DIR=/srv/nightscout/updates
SCRIPT_VERSION="1.4.0" #auto-update
SCRIPT_BUILD_TIME="2023.09.04" #auto-update
SCRIPT_VERSION="1.5.0" #auto-update
SCRIPT_BUILD_TIME="2023.09.07" #auto-update
#=======================================
# SETUP
@ -282,8 +282,7 @@ multiline_length() {
local maxLen=0
# shellcheck disable=SC2059
readarray -t array <<<"$(printf "$string")"
for i in "${!array[@]}"
do
for i in "${!array[@]}"; do
local line=${array[i]}
lineLen=${#line}
if [ "$lineLen" -gt "$maxLen" ]; then
@ -305,8 +304,7 @@ center_multiline() {
local string=$1
# shellcheck disable=SC2059
readarray -t array <<<"$(printf "$string")"
for i in "${!array[@]}"
do
for i in "${!array[@]}"; do
local line=${array[i]}
# shellcheck disable=SC2005
echo "$(center_text "$line" "$maxLen")"
@ -941,8 +939,7 @@ version_menu() {
local ns_tag=$(dotenv-tool -r get -f $ENV_FILE_DEP "NS_NIGHTSCOUT_TAG")
local versions=()
while read -r line
do
while read -r line; do
if [ "$line" == "$ns_tag" ]; then
continue
fi

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

@ -17,8 +17,8 @@ MONGO_DB_DIR=/srv/nightscout/data/mongodb
TOOL_FILE=/srv/nightscout/tools/nightscout-tool
TOOL_LINK=/usr/bin/nightscout-tool
UPDATES_DIR=/srv/nightscout/updates
SCRIPT_VERSION="1.4.0" #auto-update
SCRIPT_BUILD_TIME="2023.09.04" #auto-update
SCRIPT_VERSION="1.5.0" #auto-update
SCRIPT_BUILD_TIME="2023.09.07" #auto-update
#=======================================
# SETUP
@ -266,8 +266,7 @@ multiline_length() {
local maxLen=0
# shellcheck disable=SC2059
readarray -t array <<<"$(printf "$string")"
for i in "${!array[@]}"
do
for i in "${!array[@]}"; do
local line=${array[i]}
lineLen=${#line}
if [ "$lineLen" -gt "$maxLen" ]; then
@ -289,8 +288,7 @@ center_multiline() {
local string=$1
# shellcheck disable=SC2059
readarray -t array <<<"$(printf "$string")"
for i in "${!array[@]}"
do
for i in "${!array[@]}"; do
local line=${array[i]}
# shellcheck disable=SC2005
echo "$(center_text "$line" "$maxLen")"
@ -925,8 +923,7 @@ version_menu() {
local ns_tag=$(dotenv-tool -r get -f $ENV_FILE_DEP "NS_NIGHTSCOUT_TAG")
local versions=()
while read -r line
do
while read -r line; do
if [ "$line" == "$ns_tag" ]; then
continue
fi

@ -1,6 +1,6 @@
#!/bin/bash
### version: 1.4.0
### version: 1.5.0
# ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.#
# Nightscout Mikr.us setup script #

@ -1 +1 @@
2023-09-04T21:02:09.851Z
2023-09-07T21:38:38.332Z
Loading…
Cancel
Save