@@ -285,9 +285,9 @@ function (ConsoleCommandEvent $event) {
285
285
/**
286
286
* Display all of the currently secured sites.
287
287
*/
288
- $ app ->command ('secured [--expiring] [--days=] ' , function (OutputInterface $ output , $ expiring = null , $ days = 60 ) {
288
+ $ app ->command ('secured [--expiring] [--days=] [--ca] ' , function (OutputInterface $ output , $ expiring = null , $ days = 60 , $ ca = null ) {
289
289
$ now = (new Datetime )->add (new DateInterval ('P ' .$ days .'D ' ));
290
- $ sites = collect (Site::securedWithDates ())
290
+ $ sites = collect (Site::securedWithDates ($ ca ))
291
291
->when ($ expiring , fn ($ collection ) => $ collection ->filter (fn ($ row ) => $ row ['exp ' ] < $ now ))
292
292
->map (function ($ row ) {
293
293
return [
@@ -301,16 +301,18 @@ function (ConsoleCommandEvent $event) {
301
301
})->descriptions ('Display all of the currently secured sites ' , [
302
302
'--expiring ' => 'Limits the results to only sites expiring within the next 60 days. ' ,
303
303
'--days ' => 'To be used with --expiring. Limits the results to only sites expiring within the next X days. Default is set to 60. ' ,
304
+ '--ca ' => 'Include the Certificate Authority certificate in the list of site certificates. ' ,
304
305
]);
305
306
306
307
/**
307
308
* Renews all domains with a trusted TLS certificate.
308
309
*/
309
- $ app ->command ('renew [--expireIn=] ' , function (OutputInterface $ output , $ expireIn = 368 ) {
310
- Site::renew ($ expireIn );
310
+ $ app ->command ('renew [--expireIn=] [--ca] ' , function (OutputInterface $ output , $ expireIn = 368 , $ ca = null ) {
311
+ Site::renew ($ expireIn, $ ca );
311
312
Nginx::restart ();
312
313
})->descriptions ('Renews all domains with a trusted TLS certificate. ' , [
313
314
'--expireIn ' => 'The amount of days the self signed certificate is valid for. Default is set to "368" ' ,
315
+ '--ca ' => 'Renew the Certificate Authority certificate before renewing the site certificates. ' ,
314
316
]);
315
317
316
318
/**
0 commit comments