2013-07-11 17:00:54 +00:00
|
|
|
#!/bin/sh
|
2014-07-29 02:12:24 +00:00
|
|
|
rm -rf /var/run/config.check
|
|
|
|
mkdir -p /var/run/config.check
|
|
|
|
for config in /etc/config/*; do
|
|
|
|
file=${config##*/}
|
|
|
|
uci show "${file##*/}" > /var/run/config.check/$file
|
|
|
|
done
|
2013-07-11 17:00:54 +00:00
|
|
|
MD5FILE=/var/run/config.md5
|
|
|
|
[ -f $MD5FILE ] && {
|
2020-05-10 14:47:53 +00:00
|
|
|
for c in $(md5sum -c $MD5FILE 2>/dev/null| grep FAILED | cut -d: -f1); do
|
2013-07-11 17:00:54 +00:00
|
|
|
ubus call service event "{ \"type\": \"config.change\", \"data\": { \"package\": \"$(basename $c)\" }}"
|
|
|
|
done
|
|
|
|
}
|
2014-07-29 02:12:24 +00:00
|
|
|
md5sum /var/run/config.check/* > $MD5FILE
|
|
|
|
rm -rf /var/run/config.check
|