iup: polling.enabled: implement functionality

This commit is contained in:
Alex Oprea 2017-02-03 22:14:06 +01:00
parent 515ab236b5
commit d1a12bc597

View file

@ -31,6 +31,7 @@ management_interfaces() {
}
init_iup() {
local polling_enabled
local interval
local starttime
local nummber
@ -44,6 +45,7 @@ init_iup() {
fi
config_load provisioning
config_get polling_enabled polling enabled on
config_get interval polling interval
config_get starttime polling starttime
@ -82,6 +84,11 @@ init_iup() {
ubus call network reload
#################################################################
if [ $polling_enabled == "off" ]; then
sed -i "/\/sbin\/iup/d" $CRONPATH
return
fi
if [ $interval == "weekly" ]; then
interval="0"
elif [ $interval == "hourly" ]; then