mirror of
https://github.com/unraid/webgui.git
synced 2026-01-15 22:19:58 -06:00
Docker: honor user setting of stop time-out
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?PHP
|
||||
/* Copyright 2005-2020, Lime Technology
|
||||
* Copyright 2012-2020, Bergware International.
|
||||
/* Copyright 2005-2022, Lime Technology
|
||||
* Copyright 2012-2022, Bergware International.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2,
|
||||
@@ -108,9 +108,9 @@ case 'ct':
|
||||
// since container was already running, put it back it to a running state after update
|
||||
$cmd = str_replace('/docker create ', '/docker run -d ', $cmd);
|
||||
// attempt graceful stop of container first
|
||||
$DockerClient->stopContainer($ct,30);
|
||||
$DockerClient->stopContainer($ct);
|
||||
}
|
||||
// force kill container if still running after 30 seconds
|
||||
// force kill container if still running after time-out
|
||||
$DockerClient->removeContainer($ct);
|
||||
execCommand($cmd,false);
|
||||
$DockerClient->flushCaches();
|
||||
|
||||
Reference in New Issue
Block a user