|
|
|
@ -1029,8 +1029,8 @@ admin_panel_promo() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get_watchdog_age_string() {
|
|
|
|
|
local curr_time=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
|
|
|
local last_time=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
|
|
|
local curr_time=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
|
|
|
|
|
|
|
|
if [[ -f $WATCHDOG_TIME_FILE ]]; then
|
|
|
|
|
last_time=$(cat $WATCHDOG_TIME_FILE)
|
|
|
|
@ -1088,6 +1088,9 @@ get_watchdog_status_code_live() {
|
|
|
|
|
|
|
|
|
|
if [ "$COMBINED_STATUS" = "running running" ]; then
|
|
|
|
|
local domain=$(get_td_domain)
|
|
|
|
|
local domainLen=${#domain}
|
|
|
|
|
if ((domainLen > 15)); then
|
|
|
|
|
|
|
|
|
|
local html=$(curl -Lks "$domain")
|
|
|
|
|
|
|
|
|
|
if [[ "$html" =~ github.com/nightscout/cgm-remote-monitor ]]; then
|
|
|
|
@ -1103,6 +1106,10 @@ get_watchdog_status_code_live() {
|
|
|
|
|
status="restarting"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
status="detection_failed"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
if [ "$NS_STATUS" = "restarting" ] || [ "$DB_STATUS" = "restarting" ]; then
|
|
|
|
|
status="restarting"
|
|
|
|
@ -1571,6 +1578,9 @@ watchdog_check() {
|
|
|
|
|
if [ "$COMBINED_STATUS" = "running running" ]; then
|
|
|
|
|
echo "Will check page contents"
|
|
|
|
|
local domain=$(get_td_domain)
|
|
|
|
|
|
|
|
|
|
local domainLen=${#domain}
|
|
|
|
|
if ((domainLen > 15)); then
|
|
|
|
|
local html=$(curl -Lks "$domain")
|
|
|
|
|
|
|
|
|
|
WATCHDOG_STATUS="detection_failed"
|
|
|
|
@ -1595,6 +1605,10 @@ watchdog_check() {
|
|
|
|
|
WATCHDOG_STATUS="restarting"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
WATCHDOG_STATUS="detection_failed"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
if [ "$NS_STATUS" = "restarting" ] || [ "$DB_STATUS" = "restarting" ]; then
|
|
|
|
|
WATCHDOG_STATUS="restarting"
|
|
|
|
|