diff mbox series

[OpenWrt-Devel,2/2] procd: allow optional watchdog instance parameter

Message ID CABzx=O0frJMqUCJOJ8bMpkpY8dSmhQcEneUOL5HG9H8f+MQyQA@mail.gmail.com
State Changes Requested
Delegated to: Petr Štetiar
Headers show
Series [OpenWrt-Devel,1/2] procd: add service instance watchdog | expand

Commit Message

Daniel Bailey May 30, 2020, 1:32 a.m. UTC
From: Daniel Bailey <danielb@meshplusplus.com>
Date: Thu, 28 May 2020 20:39:35 -0700
Subject: [PATCH] procd: allow optional watchdog instance parameter

Optional instance watchdog timeout and watchdog mode be set by adding
procd_set_param $mode $timeout

$mode is an integer [0-2] representing instance watchdog mode of
operation:
0 = disabled
1 = passive mode, e.g. client must poke watchdog via ubus
2 = active mode, e.g. client must provide watchdog endpoint

Signed-off-by: Daniel Bailey <danielb@meshplusplus.com>
---
 package/system/procd/files/procd.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--
2.25.1
diff mbox series

Patch

diff --git a/package/system/procd/files/procd.sh
b/package/system/procd/files/procd.sh
index dd6dc1c58d..3a1f413f85 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -186,7 +186,7 @@  _procd_add_jail() {
  json_add_string name "$1"

  shift
-
+
  for a in $@; do
  case $a in
  log) json_add_boolean "log" "1";;
@@ -247,7 +247,7 @@  _procd_set_param() {
  env|data|limits)
  _procd_add_table "$type" "$@"
  ;;
- command|netdev|file|respawn|watch)
+ command|netdev|file|respawn|watch|watchdog)
  _procd_add_array "$type" "$@"
  ;;
  error)
@@ -378,7 +378,7 @@  _procd_append_param() {
  env|data|limits)
  _procd_add_table_data "$@"
  ;;
- command|netdev|file|respawn|watch)
+ command|netdev|file|respawn|watch|watchdog)
  _procd_add_array_data "$@"
  ;;
  error)