ucentral-client: health: remove redundant check for zero value

config_get is issued with a default (120) parameter, which makes a check for 0
a redundant.
It can be safely removed, as the check for "[ "$interval" -eq 0 ]" is
always non-zero.

Fixes 396e2bd06c ("ucentral-client: cleanup health parameter")

Tested on virtual Wlan-AP img: no syntax error occured.

Signed-off-by: Oleksandr Mazur <cahbua@gmail.com>
This commit is contained in:
Oleksandr Mazur
2023-01-03 13:34:51 +02:00
committed by John Crispin
parent 29d6d9f1ea
commit 2ec381534e

View File

@@ -20,10 +20,8 @@ start_service() {
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
}
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn 1 $interval 0
procd_close_instance
}