freeside-cdr-sftp_and_import: add an option to gunzip imported files, RT10991
[freeside.git] / FS / bin / freeside-cdrrewrited
index 809c8c9..694f980 100644 (file)
@@ -99,7 +99,7 @@ while (1) {
       #$primary->freesiderewritestatus( 'taqua-accountcode-primary' );
       my $error = $primary->replace;
       if ( $error ) {
-        warn "WARNING: error rewriting primary CDR (will retry): $error\n"
+        warn "WARNING: error rewriting primary CDR (will retry): $error\n";
         next;
       }
 
@@ -118,6 +118,8 @@ while (1) {
       sleep 30; #i dunno, wait and see if the database comes back?
     }
 
+    last if sigterm() || sigint();
+
   }
 
   myexit() if sigterm() || sigint();