diff options
author | ivan <ivan> | 2011-09-22 21:49:33 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-09-22 21:49:33 +0000 |
commit | c7784e7df151dc58da039bc34068ae2e5ae2f21a (patch) | |
tree | 10040dee28c19a4428386fb17a6e8de7a0f4f8a5 /FS/FS/Cron | |
parent | 2413a3d43808ea6567bf25215d810bf102c498fd (diff) |
random cleanups
Diffstat (limited to 'FS/FS/Cron')
-rw-r--r-- | FS/FS/Cron/upload.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/FS/FS/Cron/upload.pm b/FS/FS/Cron/upload.pm index 877b07fd8..dceead6b3 100644 --- a/FS/FS/Cron/upload.pm +++ b/FS/FS/Cron/upload.pm @@ -75,7 +75,7 @@ sub upload { eval "&billco_upload( 'agentnum' => $agentnum, 'date' => $date );"; warn "billco_upload failed: $@\n" - if ( $@ ); + if $@; } @@ -93,6 +93,7 @@ sub billco_upload { my $agentnum = $opt{agentnum} or die "no agentnum provided\n"; my $url = $conf->config( 'billco-url', $agentnum ) or die "no url for agent $agentnum\n"; + $url =~ s/^\s+//; $url =~ s/\s+$//; my $username = $conf->config( 'billco-username', $agentnum, 1 ) or die "no username for agent $agentnum\n"; my $password = $conf->config( 'billco-password', $agentnum, 1 ) @@ -175,7 +176,7 @@ sub billco_upload { my($hostname, $path) = ($1, $2); - my $ftp = new Net::FTP($hostname) + my $ftp = new Net::FTP($hostname) #, Passive=>1 ) or die "can't connect to $hostname: $@\n"; $ftp->login($username, $password) or die "can't login to $hostname: ". $ftp->message."\n"; |