diff options
Diffstat (limited to 'package/system/procd/files/reload_config')
-rw-r--r-- | package/system/procd/files/reload_config | 8 |
1 files changed, 8 insertions, 0 deletions
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 |