parent
e0e56a2e4a
commit
1e52285dbe
4 changed files with 39 additions and 1 deletions
@ -0,0 +1,23 @@ |
||||
package MJB::Web::Task::WildCardSSL; |
||||
use Mojo::Base 'MJB::Web::Task', -signatures; |
||||
use IPC::Run3; |
||||
|
||||
sub run ( $job, $hosted_domain_id ) { |
||||
$job->note( _mds_template => 'build_static' ); |
||||
|
||||
my $domain = $job->app->db->hosted_domain( $hosted_domain_id ); |
||||
|
||||
# Get the SSL Certificate |
||||
my $result_fetch = $job->system_command( [ |
||||
qw(sudo certbot certonly --dns-linode ----dns-linode-credentials /etc/letsencrypt/.secrets/linode.ini -d ), '*.' . $domain->name, qw(--agree-tos --register-unsafely-without-email) |
||||
]); |
||||
|
||||
# Push the SSL Certs to all hosts |
||||
my $result_sync = $job->system_command( [ |
||||
qw(sudo letsencrypt-cert-push) |
||||
]); |
||||
|
||||
$job->finish(); |
||||
} |
||||
|
||||
1; |
||||
Loading…
Reference in new issue