|
|
|
@ -1,6 +1,6 @@
|
|
|
|
#!/bin/bash
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
### version: 1.11.0
|
|
|
|
### version: 1.11.1
|
|
|
|
|
|
|
|
|
|
|
|
# ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.#
|
|
|
|
# ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.#
|
|
|
|
# Nightscout Mikr.us setup script #
|
|
|
|
# Nightscout Mikr.us setup script #
|
|
|
|
@ -16,7 +16,7 @@
|
|
|
|
# This file is automatically generated. Do not modify it directly!
|
|
|
|
# This file is automatically generated. Do not modify it directly!
|
|
|
|
# Instead, modify the source files in the src directory and run the build script!
|
|
|
|
# Instead, modify the source files in the src directory and run the build script!
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Build time: 2026.03.09 16:28
|
|
|
|
# Build time: 2026.03.09 16:39
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -63,7 +63,7 @@ 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.11.0" #auto-update
|
|
|
|
SCRIPT_VERSION="1.11.1" #auto-update
|
|
|
|
SCRIPT_BUILD_TIME="2026.03.09" #auto-update
|
|
|
|
SCRIPT_BUILD_TIME="2026.03.09" #auto-update
|
|
|
|
FORCE_DEBUG_LOG=""
|
|
|
|
FORCE_DEBUG_LOG=""
|
|
|
|
NONINTERACTIVE_MODE="false"
|
|
|
|
NONINTERACTIVE_MODE="false"
|
|
|
|
@ -1533,7 +1533,7 @@ get_watchdog_status() {
|
|
|
|
|
|
|
|
|
|
|
|
watchdog_run() {
|
|
|
|
watchdog_run() {
|
|
|
|
local host_hash
|
|
|
|
local host_hash
|
|
|
|
host_hash=$(printf '%s' "$(hostname)" | md5sum | awk '{print $1}' | cut -c1-8 | xargs printf '%d' 16 16)
|
|
|
|
host_hash=$(( 16#$(printf '%s' "$(hostname)" | md5sum | awk '{print $1}' | cut -c1-8) ))
|
|
|
|
local offset=$(( host_hash % 300 ))
|
|
|
|
local offset=$(( host_hash % 300 ))
|
|
|
|
echo "Watchdog delay: sleeping ${offset}s (host-based offset)"
|
|
|
|
echo "Watchdog delay: sleeping ${offset}s (host-based offset)"
|
|
|
|
sleep "$offset"
|
|
|
|
sleep "$offset"
|
|
|
|
|