mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 18:07:52 +00:00
ucentral-client: update to latest HEAD
This adds a connection watchdog. Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -6,7 +6,7 @@ PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL=https://github.com/blogic/ucentral-client.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2021-02-15
|
||||
PKG_SOURCE_VERSION:=eabfeaa480814d5500747303f074cc6830b75200
|
||||
PKG_SOURCE_VERSION:=e27356216c6baecda9424b81ad90242505e16f08
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||
|
||||
14
feeds/ucentral/ucentral-client/files/etc/init.d/ucentral-wdt
Executable file
14
feeds/ucentral/ucentral-client/files/etc/init.d/ucentral-wdt
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/libexec/ucentral-wdt.sh
|
||||
|
||||
start_service() {
|
||||
active=$(readlink /etc/ucentral/ucentral.active)
|
||||
[ -n "$active" -a "$active" != "/etc/ucentral/ucentral.cfg.0000000001" ] && return 0
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG"
|
||||
procd_close_instance
|
||||
}
|
||||
16
feeds/ucentral/ucentral-client/files/usr/libexec/ucentral-wdt.sh
Executable file
16
feeds/ucentral/ucentral-client/files/usr/libexec/ucentral-wdt.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user