From 6f4a0fd6ce402536c10ceb73cf2290bc9d5b86df Mon Sep 17 00:00:00 2001 From: Blog Manager Robot Date: Sun, 16 Oct 2022 23:04:19 +0000 Subject: [PATCH] Sync SSH Keys on create. --- Web/lib/MJB/Web/Task/CreateSSLCert.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Web/lib/MJB/Web/Task/CreateSSLCert.pm b/Web/lib/MJB/Web/Task/CreateSSLCert.pm index c0b41d9..7890786 100644 --- a/Web/lib/MJB/Web/Task/CreateSSLCert.pm +++ b/Web/lib/MJB/Web/Task/CreateSSLCert.pm @@ -8,9 +8,14 @@ sub run ( $job, $blog_id ) { my $blog = $job->app->db->blog( $blog_id ); # Get the SSL Certificate - my $result = $job->system_command( [ + my $result_fetch = $job->system_command( [ qw(sudo certbot certonly --standalone -d), $blog->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(); }