|
|
|
@ -595,6 +595,30 @@ sub collect_remote_data |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
print "- Grabbing Anvil! config... "; |
|
|
|
|
$anvil->Storage->rsync({ |
|
|
|
|
debug => 2, |
|
|
|
|
source => "root\@".$anvil->data->{peer}{$short_host_name}{access}{ip}.":/etc/anvil/anvil.conf*", |
|
|
|
|
destination => $target_directory."/", |
|
|
|
|
}); |
|
|
|
|
$test_file = $target_directory."/anvil.conf"; |
|
|
|
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { test_file => $test_file }}); |
|
|
|
|
if (-e $test_file) |
|
|
|
|
{ |
|
|
|
|
print "Done.\n"; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
print "Failed!\n"; |
|
|
|
|
print "- For some reason, this file was not collected.\n"; |
|
|
|
|
$anvil->Storage->write_file({ |
|
|
|
|
file => $test_file, |
|
|
|
|
body => $failed_body, |
|
|
|
|
overwrite => 1, |
|
|
|
|
backup => 0, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
# If this is a node, grab the shared files. |
|
|
|
|
if ($this_host_type eq "node") |
|
|
|
|
{ |
|
|
|
@ -794,6 +818,17 @@ sub collect_local_data |
|
|
|
|
}}); |
|
|
|
|
print "Done!\n"; |
|
|
|
|
|
|
|
|
|
print "- Grabbing Anvil! config... "; |
|
|
|
|
$shell_call = $anvil->data->{path}{exe}{cp}." /etc/anvil/anvil.conf ".$target_directory."/"; |
|
|
|
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { shell_call => $shell_call }}); |
|
|
|
|
|
|
|
|
|
($output, $return_code) = $anvil->System->call({shell_call => $shell_call}); |
|
|
|
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { |
|
|
|
|
output => $output, |
|
|
|
|
return_code => $return_code, |
|
|
|
|
}}); |
|
|
|
|
print "Done!\n"; |
|
|
|
|
|
|
|
|
|
print "- Grabbing Anvil! log... "; |
|
|
|
|
$shell_call = $anvil->data->{path}{exe}{cp}." /var/log/anvil.log ".$target_directory."/"; |
|
|
|
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { shell_call => $shell_call }}); |
|
|
|
|