Files
wlan-ap/feeds/ucentral/ucentral-client/files/usr/libexec/ucentral-wdt.sh
John Crispin d61d5cd35e ucentral-client: update to latest HEAD
This adds a connection watchdog.

Signed-off-by: John Crispin <john@phrozen.org>
2021-11-08 09:15:42 +01:00

17 lines
289 B
Bash
Executable File

#!/bin/sh
sleep 60
[ -f /etc/ucentral/redirector.json ] || return 0
active=$(ubus call ucentral status | jsonfilter -e '@.active')
[ -n "$active" -a ! "$active" -eq 1 ] && {
logger ucentral-wdt: all good
exit 0
}
logger ucentral-wdt: restarting client
/etc/init.d/ucentral restart