Files
wlan-ap/feeds/ucentral/ucentral-client/files/etc/init.d/uhealth
John Crispin 396e2bd06c ucentral-client: cleanup health parameter
Signed-off-by: John Crispin <john@phrozen.org>
2022-03-29 07:29:12 +02:00

30 lines
497 B
Bash
Executable File

#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
PROG=/usr/share/ucentral/health.uc
boot() {
# dummy stub to make sure health does not start before
# a config is applied
true
}
service_triggers() {
procd_add_reload_trigger ustats
}
start_service() {
. /lib/functions.sh
config_load 'ustats'
config_get interval 'health' 'interval' 120
[ "$interval" -eq 0 ] || {
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn 1 $interval 0
procd_close_instance
}
}