#!/usr/bin/php verbose = true; break; case 'check': $check = true; break;} } if (!isset($check)) { echo " Updating templates... "; $DockerTemplates->downloadTemplates(); echo " Updating info... "; $DockerTemplates->getAllInfo(true); echo " Done."; } else { require_once("/usr/local/emhttp/webGui/include/Wrappers.php"); $notify = "/usr/local/emhttp/webGui/scripts/notify"; $unraid = parse_plugin_cfg("dynamix",true); $server = strtoupper($var['NAME']); $output = $unraid['notify']['docker_notify']; $list = $DockerClient->getDockerContainers(); $info = $DockerTemplates->getAllInfo(true); foreach ($list as $ct) { $name = $ct['Name']; $image = $ct['Image']; if ($info[$name]['updated'] == "false") { $updateStatus = (is_file($dockerManPaths['update-status'])) ? json_decode(file_get_contents($dockerManPaths['update-status']), TRUE) : array(); $new = $updateStatus[$image]['remote']; exec("$notify -e 'Docker - $name [$new]' -s 'Notice [$server] - Docker update $new' -d 'A new version of $name is available' -i 'normal $output' -x"); } } } exit(0); ?>