parent
7c12a58d12
commit
df78564eea
2 changed files with 22 additions and 3 deletions
@ -0,0 +1,18 @@ |
||||
package MJB::Web::Task::CreateSSLCert; |
||||
use Mojo::Base 'MJB::Web::Task', -signatures; |
||||
use IPC::Run3; |
||||
|
||||
sub run ( $job, $blog_id ) { |
||||
$job->note( _mds_template => 'build_static' ); |
||||
|
||||
my $blog = $job->app->db->blog( $blog_id ); |
||||
|
||||
# Get the SSL Certificate |
||||
my $result = $job->system_command( [ |
||||
qw(sudo certbot certonly --standalone -d), $blog->domain->name, qw(--agree-tos --register-unsafely-without-email) |
||||
]); |
||||
|
||||
$job->finish(); |
||||
} |
||||
|
||||
1; |
||||
Loading…
Reference in new issue