|
|
|
@ -39,11 +39,11 @@ sub run ( $job, $blog_id ) { |
|
|
|
my $server = 'root@' . $host->hostname; |
|
|
|
my $server = 'root@' . $host->hostname; |
|
|
|
my $domain = $blog->domain->name; |
|
|
|
my $domain = $blog->domain->name; |
|
|
|
|
|
|
|
|
|
|
|
$job->system_command( [ 'scp', $config->to_string, $server . ":/etc/nginx/sites-enabled/" . $domain ] ); |
|
|
|
$job->system_command( [ 'scp', $config->to_string, $server . ":/etc/nginx/sites-enabled/" . $domain ], { retry_on_ssh_fail => 1 } ); |
|
|
|
$job->system_command( [ 'ssh', $server, 'mkdir -p /var/www/' . $domain . '/html' ] ); |
|
|
|
$job->system_command( [ 'ssh', $server, 'mkdir -p /var/www/' . $domain . '/html' ], { retry_on_ssh_fail => 1 } ); |
|
|
|
$job->system_command( [ 'scp', $welcome->to_string, $server . ":/var/www/" . $domain . "/html/index.html" ] ); |
|
|
|
$job->system_command( [ 'scp', $welcome->to_string, $server . ":/var/www/" . $domain . "/html/index.html" ], { retry_on_ssh_fail => 1 } ); |
|
|
|
$job->system_command( [ 'ssh', $server, 'chown -R www-data:www-data /var/www/' . $domain ] ); |
|
|
|
$job->system_command( [ 'ssh', $server, 'chown -R www-data:www-data /var/www/' . $domain ], { retry_on_ssh_fail => 1 } ); |
|
|
|
$job->system_command( [ 'ssh', $server, 'systemctl reload nginx' ] ); |
|
|
|
$job->system_command( [ 'ssh', $server, 'systemctl reload nginx' ], { retry_on_ssh_fail => 1 } ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$job->note( is_config_deployed => 1 ); |
|
|
|
$job->note( is_config_deployed => 1 ); |
|
|
|
|