Added checks for the screenshot directory before collection.

Signed-off-by: digimer <mkelly@alteeve.ca>
main
digimer 1 year ago
parent 663a1e0527
commit b8fb3d62e3
  1. 7
      tools/striker-collect-debug

@ -665,6 +665,8 @@ sub collect_local_data
# Grab screenshots.
print "- Collecting server screenshots... ";
if (-d $anvil->data->{path}{directories}{screenshots})
{
$shell_call = $anvil->data->{path}{exe}{tar}." -cvjf ".$target_directory."/server-screenshots.bz2 ".$anvil->data->{path}{directories}{screenshots};
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { shell_call => $shell_call }});
@ -685,6 +687,11 @@ sub collect_local_data
}
print "Done!\n";
}
else
{
print "Failed!\nScreenshot directory: [".$anvil->data->{path}{directories}{screenshots}."] doesn't exist, skipping.\n";
}
}
print "- Grabbing hosts file... ";
$shell_call = $anvil->data->{path}{exe}{cp}." /etc/hosts ".$target_directory."/";

Loading…
Cancel
Save