aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/procd/files/procd.sh
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2013-09-17 21:45:24 +0000
committerJohn Crispin <john@openwrt.org>2013-09-17 21:45:24 +0000
commit4f62127dea854024116383c84fedb673baaae9cd (patch)
tree71bfb2a7ab10d7358b7e885f9434edc4f33611ac /package/system/procd/files/procd.sh
parentf12f4074aff6536a8056689406197809be373685 (diff)
downloadupstream-4f62127dea854024116383c84fedb673baaae9cd.tar.gz
upstream-4f62127dea854024116383c84fedb673baaae9cd.tar.bz2
upstream-4f62127dea854024116383c84fedb673baaae9cd.zip
procd: update to latest git head
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 38022
Diffstat (limited to 'package/system/procd/files/procd.sh')
-rw-r--r--package/system/procd/files/procd.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index 096eb2de32..b65bf293d6 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -12,6 +12,7 @@
# procd_set_param(type, [value...])
# Available types:
# command: command line (array).
+# respawn info: array with 3 values $restart_timeout $fail_hreshold $max_fail
# env: environment variable (passed to the process)
# data: arbitrary name/value pairs for detecting config changes (table)
# file: configuration files (array)
@@ -123,7 +124,7 @@ _procd_set_param() {
env|data)
_procd_add_table "$type" "$@"
;;
- command|netdev|file)
+ command|netdev|file|respawn)
_procd_add_array "$type" "$@"
;;
nice)
@@ -153,6 +154,20 @@ _procd_add_config_trigger() {
json_close_array
}
+_procd_add_reload_trigger() {
+ local script=$(readlink "$initscript")
+ local name=$(basename ${script:-$initscript})
+
+ _procd_add_config_trigger $1 /etc/init.d/$name reload
+}
+
+_procd_add_reload_trigger() {
+ local script=$(readlink "$initscript")
+ local name=$(basename ${script:-$initscript})
+
+ _procd_add_config_trigger $1 /etc/init.d/$name reload
+}
+
_procd_append_param() {
local type="$1"; shift
@@ -161,7 +176,7 @@ _procd_append_param() {
env|data)
_procd_add_table_data "$@"
;;
- command|netdev|file)
+ command|netdev|file|respawn)
_procd_add_array_data "$@"
;;
esac
@@ -197,6 +212,7 @@ _procd_wrapper \
procd_close_service \
procd_add_instance \
procd_add_config_trigger \
+ procd_add_reload_trigger \
procd_open_trigger \
procd_close_trigger \
procd_open_instance \