From 24310fa55a403f7d6307cfbd5a769238ddb8c6ee Mon Sep 17 00:00:00 2001 From: Robin Kluth Date: Mon, 28 Aug 2023 20:15:04 +0200 Subject: [PATCH] Repair docker auto update (again) --- src/scripts/backup.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/scripts/backup.php b/src/scripts/backup.php index 5e65beb..b867437 100644 --- a/src/scripts/backup.php +++ b/src/scripts/backup.php @@ -267,30 +267,30 @@ goto abort; } +ABHelper::backupLog("Starting Docker auto-update check..."); foreach ($sortedStopContainers as $container) { $containerSettings = $abSettings->getContainerSpecificSettings($container['Name']); if ($containerSettings['updateContainer'] == 'yes') { - ABHelper::backupLog("Auto-Update for '{$container['Name']}' is enabled - checking for update..."); if (!isset($allInfo)) { ABHelper::backupLog("Requesting docker template meta...", ABHelper::LOGLEVEL_DEBUG); $dockerTemplates = new \DockerTemplates(); $allInfo = $dockerTemplates->getAllInfo(true, true); - ABHelper::backupLog(print_r($allInfo, true), ABHelper::LOGLEVEL_DEBUG); + ABHelper::backupLog(var_export($allInfo, true), ABHelper::LOGLEVEL_DEBUG); } - if (isset($allInfo[$container['Name']]) && !$allInfo[$container['Name']]['updated']) { - ABHelper::backupLog("Update available! Installing..."); + if (isset($allInfo[$container['Name']]) && ($allInfo[$container['Name']]['updated'] ?? 'true') == 'false') { # string 'false' = Update available! + ABHelper::backupLog("Auto-Update for '{$container['Name']}' is enabled and update is available!! Installing..."); exec('/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/update_container ' . escapeshellarg($container['Name'])); - ABHelper::backupLog("Update finished (hopefully)."); } else { - ABHelper::backupLog("No update available."); + ABHelper::backupLog("Auto-Update for '{$container['Name']}' is enabled but no update is available."); } } if (ABHelper::abortRequested()) { goto abort; } } +ABHelper::backupLog("Docker update check finished!"); if (!empty($abSettings->includeFiles)) {