From db9d63423edd480f884319dab3e8bd1f615f79a0 Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Sat, 23 Jan 2016 12:46:49 +0000 Subject: [PATCH] 98_update.pm: UPDATE event from Markus (Forum #47976) git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@10607 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_update.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/98_update.pm b/fhem/FHEM/98_update.pm index ed002abdc..b49203963 100644 --- a/fhem/FHEM/98_update.pm +++ b/fhem/FHEM/98_update.pm @@ -218,6 +218,12 @@ doUpdateLoop($$) doUpdate(++$curr, $max, $srcLine, $arg); HttpUtils_Close(\%upd_connecthash); } + + if($updateInBackground) { + BlockingInformParent("DoTrigger", ["global", "UPDATE", 0 ], 0) + } else { + DoTrigger("global","UPDATE", 0); + } } sub @@ -627,7 +633,8 @@ upd_initRestoreDirs($) Update the FHEM installation. Technically this means update will download the controlfile(s) first, compare it to the local version of the file in the moddir/FHEM directory, and download each file where the attributes (timestamp - and filelength) are different. + and filelength) are different. Upon completion it triggers the global:UPDATE + event.
With the commands add/delete/list/reset you can manage the list of controlfiles, e.g. for thirdparty packages. @@ -725,7 +732,8 @@ upd_initRestoreDirs($) Kontroll-Datei(en) heruntergeladen, und mit der lokalen Version dieser Datei in moddir/FHEM verglichen. Danach werden alle in der Kontroll-Datei spezifizierten Dateien heruntergeladen, deren Größe oder - Zeitstempel sich unterscheidet. + Zeitstempel sich unterscheidet. Wenn dieser Ablauf abgeschlossen ist, wird + das globale UPDATE Ereignis ausgelöst.
Mit den Befehlen add/delete/list/reset kann man die Liste der Kontrolldateien pflegen.