diff --git a/plugins/dynamix/SSLSettings.page b/plugins/dynamix/SSLSettings.page index 94c3f099c..6045c4250 100644 --- a/plugins/dynamix/SSLSettings.page +++ b/plugins/dynamix/SSLSettings.page @@ -1,6 +1,5 @@ Menu="Identification" Title="Management Access" -Icon="ident.png" Tag="expeditedssl" --- +function find_tasks() { + global $site; + $tasks = []; + foreach ($site as $page) { + if (empty($page['Menu'])) continue; + $menu = strtok($page['Menu'], ' '); + switch ($menu[0]) { + case '$': $menu = get_ini_key($menu,strtok(' ')); break; + case '/': $menu = get_file_key($menu,strtok(' ')); break; + } + while ($menu !== false) { + if (substr($menu,0,5) == 'Tasks') { + if (empty($page['Cond'])) $tasks[] = $page['name']; + break; + } + $menu = strtok(' '); + } + } + sort($tasks); + return $tasks; +} $keyfile = @file_get_contents($var['regFILE']); -if ($keyfile !== false) - $keyfile = @base64_encode($keyfile); $isLEcert = file_exists("/boot/config/ssl/certs/certificate_bundle.pem"); -if ($isLEcert) - exec("/usr/bin/openssl x509 -checkend 2592000 -noout -in /etc/ssl/certs/unraid_bundle.pem",$arrout,$retval_expired); +if ($keyfile !== false) $keyfile = base64_encode($keyfile); +if ($isLEcert) exec("/usr/bin/openssl x509 -checkend 2592000 -noout -in /etc/ssl/certs/unraid_bundle.pem",$arrout,$retval_expired); $provisionlabel = $isLEcert ? 'Renew' : 'Provision'; $disabled_provision = $keyfile===false || ($isLEcert && $retval_expired===0) || $var['USE_SSL']!="auto" ? 'disabled' : ''; $disabled_updatedns = $keyfile!==false && $isLEcert ? '' : 'disabled'; $internalip = $eth0['IPADDR:0']; +$tasks = find_tasks(); ?> @@ -117,8 +136,14 @@ $(function(){