DSL status pulling, RT#13656
[freeside.git] / FS / FS / Cron / upload.pm
index cb6c628..877b07f 100644 (file)
@@ -97,8 +97,8 @@ sub billco_upload {
     or die "no username for agent $agentnum\n";
   my $password = $conf->config( 'billco-password', $agentnum, 1 )
     or die "no password for agent $agentnum\n";
-  my $clicode  = $conf->config( 'billco-clicode', $agentnum )
-    or die "no clicode for agent $agentnum\n";
+  my $clicode  = $conf->config( 'billco-clicode', $agentnum, 1 );
+    #or die "no clicode for agent $agentnum\n";
 
   die "no date provided\n" unless $opt{date};
   my $zipfile  = "$dir/agentnum$agentnum-$opt{date}.zip";
@@ -179,8 +179,10 @@ sub billco_upload {
       or die "can't connect to $hostname: $@\n";
     $ftp->login($username, $password)
       or die "can't login to $hostname: ". $ftp->message."\n";
-    $ftp->cwd($path)
-      or die "can't cd $path on $hostname: ". $ftp->message. "\n";
+    unless ( $ftp->cwd($path) ) {
+      my $msg = "can't cd $path on $hostname: ". $ftp->message. "\n";
+      ( $path eq '/' ) ? warn $msg : die $msg;
+    }
     $ftp->binary
       or die "can't set binary mode on $hostname\n";