Переглянути джерело

use certbot for gatering informations

andre 8 місяців тому
батько
коміт
c424c076de
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      controllers/GetSSLDaysController.php

+ 1 - 1
controllers/GetSSLDaysController.php

@@ -12,7 +12,7 @@ class GetSSLDaysController {
         }
         }
 
 
         exec("sudo certbot certificates --cert-name $domain | grep 'Expiry' | grep 'Expiry' | sed 's/  //g'", $phpOutput, $phpReturnCode);
         exec("sudo certbot certificates --cert-name $domain | grep 'Expiry' | grep 'Expiry' | sed 's/  //g'", $phpOutput, $phpReturnCode);
-        $sslData = implode(" ",$phpOutput);
+        $sslData = explode(" ",$phpOutput[0]);
         /*
         /*
         $certFile = "/etc/letsencrypt/live/$domain/fullchain.pem";
         $certFile = "/etc/letsencrypt/live/$domain/fullchain.pem";
         if (!file_exists($certFile)) {
         if (!file_exists($certFile)) {