@@ -177,6 +177,9 @@ local function load_config()
177177 end
178178 end
179179
180+ -- forcing uci to reload kube and flukso configs from file
181+ uci :load (" kube" )
182+ uci :load (" flukso" )
180183 KUBE = uci :get_all (" kube" )
181184 SENSOR = uci :get_all (" flukso" )
182185 CACHEDIR = load_cachedir ()
@@ -412,6 +415,7 @@ local function provision_kube(hw_id_hex, hw_type_s)
412415 SENSOR = uci :get_all (" flukso" )
413416 end
414417 uci :commit (" flukso" )
418+ ub :send (" flukso.sighup" , {})
415419
416420 return tonumber (kid_s )
417421 end
@@ -435,6 +439,7 @@ local function deprovision_kube(kid_s)
435439 uci :delete (" kube" , kid_s )
436440 uci :save (" kube" )
437441 uci :commit (" kube" )
442+ ub :send (" flukso.sighup" , {})
438443end
439444
440445local function is_kid_allocated (kid_s , hw_type_s )
@@ -780,12 +785,20 @@ local ub_methods = {
780785ub :add (ub_methods )
781786
782787local ub_events = {
788+ [" flukso.sighup" ] = function (msg )
789+ event :process (" e_init" )
790+ end ,
791+
783792 [" flukso.kube.event" ] = function (msg )
784793 if type (msg .event ) == " string" then
785794 event :process (msg .event )
786795 end
787796 end ,
788797
798+ [" flukso.kube.pair" ] = function (msg )
799+ event :process (" e_pair" )
800+ end ,
801+
789802 [" flukso.kube.packet.rx" ] = function (msg )
790803 if type (msg .hex ) ~= " string" then return end
791804 local arg = { bin = unhex (msg .hex ), hex = msg .hex , hdr = { }, pld = { } }
0 commit comments