Fix in PluginTools (default value for tentacle port)

This commit is contained in:
fbsanchez 2018-06-27 18:54:35 +02:00
parent 623afea5fe
commit a57570174c
1 changed files with 15 additions and 10 deletions

View File

@ -702,7 +702,8 @@ sub transfer_xml {
# Reassign default values if not present
$conf->{tentacle_client} = "tentacle_client" if empty($conf->{tentacle_client});
$conf->{tentacle_port} = "44121" if empty($conf->{tentacle_port});
$conf->{tentacle_port} = "41121" if empty($conf->{tentacle_port});
$conf->{tentacle_opts} = "" if empty($conf->{tentacle_opts});
$conf->{mode} = $conf->{transfer_mode} if empty($conf->{mode});
if (empty ($conf->{mode}) ) {
@ -712,26 +713,30 @@ sub transfer_xml {
#Transfering XML file
if ($conf->{mode} eq "tentacle") {
my $msg = "";
my $r = -1;
#Send using tentacle
if ($^O =~ /win/i) {
`$conf->{tentacle_client} -v -a $conf->{tentacle_ip} -p $conf->{tentacle_port} $conf->{tentacle_opts} "$file_path"`;
$msg = `$conf->{tentacle_client} -v -a $conf->{tentacle_ip} -p $conf->{tentacle_port} $conf->{tentacle_opts} "$file_path"`;
$r = $?;
}
else {
`$conf->{tentacle_client} -v -a $conf->{tentacle_ip} -p $conf->{tentacle_port} $conf->{tentacle_opts} "$file_path" 2>&1 > /dev/null`;
$msg = `$conf->{tentacle_client} -v -a $conf->{tentacle_ip} -p $conf->{tentacle_port} $conf->{tentacle_opts} "$file_path" 2>&1`;
$r = $?;
}
#If no errors were detected delete file
if (! $?) {
if ($r == 0) {
unlink ($file_path);
} else {
print_stderror($conf, "[ERROR] There was a problem sending file [$file_path] using tentacle");
return undef;
}
}
else {
print_stderror($conf, trim($msg) . " File [$file_path]");
return undef;
}
}
else {
#Copy file to local folder
my $dest_dir = $conf->{local_folder};