[luci] stop the avahi-daemon in luci-reload to free up precious memory

This commit is contained in:
Bart Van Der Meerssche 2011-04-24 13:34:15 +02:00
parent c2ab0342cf
commit 16ebc0e55e
1 changed files with 14 additions and 0 deletions

View File

@ -28,7 +28,20 @@ reload_init() {
} }
} }
avahi_stop() {
[ -s /var/run/avahi-daemon/pid ] && {
AVAHI=1
/etc/init.d/avahi-daemon stop
}
}
avahi_start() {
[ -n $AVAHI ] && /etc/init.d/avahi-daemon start
}
lock "/var/run/luci-reload" lock "/var/run/luci-reload"
avahi_stop
config_load ucitrack config_load ucitrack
@ -36,5 +49,6 @@ for i in $*; do
config_foreach apply_config $i $i config_foreach apply_config $i $i
done done
avahi_start
rm -f "/var/run/luci-reload-status" rm -f "/var/run/luci-reload-status"
lock -u "/var/run/luci-reload" lock -u "/var/run/luci-reload"