From bd86f39993db7511cb71a66c11ed56f5fa48be28 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 7 May 2013 18:28:37 -0700 Subject: [PATCH] add -s flag to skip CDR files that error out, RT#20763 --- FS/bin/freeside-cdr-sftp_and_import | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/FS/bin/freeside-cdr-sftp_and_import b/FS/bin/freeside-cdr-sftp_and_import index c37ff11d6..9aacd6753 100755 --- a/FS/bin/freeside-cdr-sftp_and_import +++ b/FS/bin/freeside-cdr-sftp_and_import @@ -12,8 +12,8 @@ use FS::cdr; # parse command line ### -use vars qw( $opt_m $opt_p $opt_r $opt_e $opt_d $opt_v $opt_P $opt_a $opt_c $opt_g ); -getopts('c:m:p:r:e:d:v:P:ag'); +use vars qw( $opt_m $opt_p $opt_r $opt_e $opt_d $opt_v $opt_P $opt_a $opt_c $opt_g $opt_s ); +getopts('c:m:p:r:e:d:v:P:ags'); $opt_e ||= 'csv'; #$opt_e = ".$opt_e" unless $opt_e =~ /^\./; @@ -192,7 +192,7 @@ freeside-cdr-sftp_and_import - Download CDR files from a remote server via SFTP cdr.sftp_and_import [ -m method ] [ -p prefix ] [ -e extension ] [ -r remotefolder ] [ -d donefolder ] [ -v level ] [ -P port ] - [ -a ] [ -c cdrtypenum ] user format [sftpuser@]servername + [ -a ] [ -g ] [ -s ] [ -c cdrtypenum ] user format [sftpuser@]servername =head1 DESCRIPTION @@ -220,6 +220,8 @@ or FTP and then import them into the database. -g: File is gzipped +-s: Warn and skip files which could not be imported rather than abort + user: freeside username format: CDR format name -- 2.11.0