2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

98_update.pm: avoid "already running" for check/add/rm (Forum #137382)

git-svn-id: https://svn.fhem.de/fhem/trunk@28697 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2024-03-22 10:14:54 +00:00
parent 7893b8b4f8
commit 1ac8f3705e

View File

@ -49,9 +49,6 @@ CommandUpdate($$)
my ($cl,$param) = @_; my ($cl,$param) = @_;
my @args = split(/ +/,$param); my @args = split(/ +/,$param);
return "An update is already running" if($upd_running);
$upd_running = 1;
my $err = upd_metainit(0); my $err = upd_metainit(0);
return $err if($err); return $err if($err);
@ -81,6 +78,9 @@ CommandUpdate($$)
$updateInBackground = AttrVal("global","updateInBackground",1); $updateInBackground = AttrVal("global","updateInBackground",1);
$updateInBackground = 0 if($arg =~ m/^(check|checktime)$/); $updateInBackground = 0 if($arg =~ m/^(check|checktime)$/);
return "An update is already running" if($upd_running);
$upd_running = 1;
$updArg = $arg; $updArg = $arg;
if($updateInBackground) { if($updateInBackground) {
CallFn($cl->{NAME}, "ActivateInformFn", $cl, "log") if($cl); CallFn($cl->{NAME}, "ActivateInformFn", $cl, "log") if($cl);