diff --git a/fhem/FHEM/98_update.pm b/fhem/FHEM/98_update.pm index c9c0f5c4c..680791945 100644 --- a/fhem/FHEM/98_update.pm +++ b/fhem/FHEM/98_update.pm @@ -49,9 +49,6 @@ CommandUpdate($$) my ($cl,$param) = @_; my @args = split(/ +/,$param); - return "An update is already running" if($upd_running); - $upd_running = 1; - my $err = upd_metainit(0); return $err if($err); @@ -81,6 +78,9 @@ CommandUpdate($$) $updateInBackground = AttrVal("global","updateInBackground",1); $updateInBackground = 0 if($arg =~ m/^(check|checktime)$/); + return "An update is already running" if($upd_running); + $upd_running = 1; + $updArg = $arg; if($updateInBackground) { CallFn($cl->{NAME}, "ActivateInformFn", $cl, "log") if($cl);