|
|
|
@ -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
|
|
|
|
|