diff options
Diffstat (limited to 'package/system/procd/files')
-rw-r--r-- | package/system/procd/files/procd.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index c23c37b83f..91e2371d62 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -79,6 +79,9 @@ _procd_close_service() { _procd_open_trigger service_triggers _procd_close_trigger + _procd_open_data + service_data + _procd_close_data _procd_ubus_call ${1:-set} } @@ -134,6 +137,18 @@ _procd_close_trigger() { json_close_array } +_procd_open_data() { + let '_procd_data_open = _procd_data_open + 1' + [ "$_procd_data_open" -gt 1 ] && return + json_add_object "data" +} + +_procd_close_data() { + let '_procd_data_open = _procd_data_open - 1' + [ "$_procd_data_open" -lt 1 ] || return + json_close_object +} + _procd_open_validate() { json_select .. json_add_array "validate" |