aboutsummaryrefslogtreecommitdiffstats
path: root/package/system/procd/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/system/procd/files')
-rw-r--r--package/system/procd/files/procd.sh3
-rw-r--r--package/system/procd/files/reload_config8
2 files changed, 11 insertions, 0 deletions
diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index b706b1e97d..096eb2de32 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -67,6 +67,9 @@ _procd_open_service() {
_procd_close_service() {
json_close_object
+ _procd_open_trigger
+ service_triggers
+ _procd_close_trigger
_procd_ubus_call set
}
diff --git a/package/system/procd/files/reload_config b/package/system/procd/files/reload_config
new file mode 100644
index 0000000000..ef8ab87e0c
--- /dev/null
+++ b/package/system/procd/files/reload_config
@@ -0,0 +1,8 @@
+#!/bin/sh
+MD5FILE=/var/run/config.md5
+[ -f $MD5FILE ] && {
+ for c in `md5sum -c $MD5FILE 2>/dev/null| grep FAILED | cut -d: -f1`; do
+ ubus call service event "{ \"type\": \"config.change\", \"data\": { \"package\": \"$(basename $c)\" }}"
+ done
+}
+md5sum /etc/config/* > $MD5FILE