|
|
|
@ -1,6 +1,6 @@
|
|
|
|
#!/bin/bash
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
### version: 1.10.2
|
|
|
|
### version: 1.10.3
|
|
|
|
|
|
|
|
|
|
|
|
# ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.#
|
|
|
|
# ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.#
|
|
|
|
# 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.01.06 15:27
|
|
|
|
# Build time: 2026.01.06 15:45
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -61,7 +61,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.10.2" #auto-update
|
|
|
|
SCRIPT_VERSION="1.10.3" #auto-update
|
|
|
|
SCRIPT_BUILD_TIME="2026.01.06" #auto-update
|
|
|
|
SCRIPT_BUILD_TIME="2026.01.06" #auto-update
|
|
|
|
FORCE_DEBUG_LOG=""
|
|
|
|
FORCE_DEBUG_LOG=""
|
|
|
|
NONINTERACTIVE_MODE="false"
|
|
|
|
NONINTERACTIVE_MODE="false"
|
|
|
|
@ -1791,6 +1791,22 @@ source_admin() {
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
do_uninstall() {
|
|
|
|
|
|
|
|
msgok "Uninstalling..."
|
|
|
|
|
|
|
|
uninstall_containers
|
|
|
|
|
|
|
|
ohai "Usuwanie plików, proszę czekać..."
|
|
|
|
|
|
|
|
uninstall_cron
|
|
|
|
|
|
|
|
rm -r "${MONGO_DB_DIR:?}/data"
|
|
|
|
|
|
|
|
rm -r "${CONFIG_ROOT_DIR:?}"
|
|
|
|
|
|
|
|
rm "$TOOL_LINK"
|
|
|
|
|
|
|
|
rm -r "${NIGHTSCOUT_ROOT_DIR:?}/tools"
|
|
|
|
|
|
|
|
rm -r "${NIGHTSCOUT_ROOT_DIR:?}/updates"
|
|
|
|
|
|
|
|
do_cleanup_diagnostics
|
|
|
|
|
|
|
|
do_cleanup_app_logs
|
|
|
|
|
|
|
|
do_cleanup_app_state
|
|
|
|
|
|
|
|
event_mark "uninstall"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2800,6 +2816,7 @@ Options:
|
|
|
|
-r, --restart Restart containers
|
|
|
|
-r, --restart Restart containers
|
|
|
|
--update-ns Update Nightscout and Mongo containers
|
|
|
|
--update-ns Update Nightscout and Mongo containers
|
|
|
|
--force-check Force update check in UI mode
|
|
|
|
--force-check Force update check in UI mode
|
|
|
|
|
|
|
|
--uninstall Uninstall Nightscout, containers, data, config and tool
|
|
|
|
-h, --help Show this help message
|
|
|
|
-h, --help Show this help message
|
|
|
|
EOF
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -2810,7 +2827,7 @@ parse_commandline_args() {
|
|
|
|
|
|
|
|
|
|
|
|
CMDARGS=$(getopt --quiet \
|
|
|
|
CMDARGS=$(getopt --quiet \
|
|
|
|
-o wvldpuc:srh \
|
|
|
|
-o wvldpuc:srh \
|
|
|
|
--long watchdog,version,loud,develop,production,update,force-check,channel:,cleanup,restart,update-ns,help \
|
|
|
|
--long watchdog,version,loud,develop,production,update,force-check,channel:,cleanup,restart,update-ns,uninstall,help \
|
|
|
|
-n 'nightscout-tool' -- "$@")
|
|
|
|
-n 'nightscout-tool' -- "$@")
|
|
|
|
|
|
|
|
|
|
|
|
# shellcheck disable=SC2181
|
|
|
|
# shellcheck disable=SC2181
|
|
|
|
@ -2889,6 +2906,12 @@ parse_commandline_args() {
|
|
|
|
action="update-ns"
|
|
|
|
action="update-ns"
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
|
|
|
|
--uninstall)
|
|
|
|
|
|
|
|
#shellcheck disable=SC2034
|
|
|
|
|
|
|
|
NONINTERACTIVE_MODE=true
|
|
|
|
|
|
|
|
action="uninstall"
|
|
|
|
|
|
|
|
shift
|
|
|
|
|
|
|
|
;;
|
|
|
|
-h | --help)
|
|
|
|
-h | --help)
|
|
|
|
action="help"
|
|
|
|
action="help"
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
@ -2944,6 +2967,10 @@ parse_commandline_args() {
|
|
|
|
do_update_ns
|
|
|
|
do_update_ns
|
|
|
|
exit 0
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
|
|
|
|
uninstall)
|
|
|
|
|
|
|
|
do_uninstall
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$WATCHDOGMODE" = "true" ]; then
|
|
|
|
if [ "$WATCHDOGMODE" = "true" ]; then
|
|
|
|
|