[freeside-commits] branch FREESIDE_3_BRANCH updated. c7ab934cc0b83600b1ccbb177b2e2d7aa37ed2ce
Ivan
ivan at 420.am
Sat Apr 1 13:20:27 PDT 2017
The branch, FREESIDE_3_BRANCH has been updated
via c7ab934cc0b83600b1ccbb177b2e2d7aa37ed2ce (commit)
from 3f0e44be5d3d30ca99f169da7ca5622033f704b4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit c7ab934cc0b83600b1ccbb177b2e2d7aa37ed2ce
Author: Ivan Kohler <ivan at freeside.biz>
Date: Sat Apr 1 13:20:24 2017 -0700
add option to disable backup so two runs of freeside-daily with -m don't write to the same file
diff --git a/FS/bin/freeside-daily b/FS/bin/freeside-daily
index e21569d..eb1a3e3 100755
--- a/FS/bin/freeside-daily
+++ b/FS/bin/freeside-daily
@@ -8,7 +8,7 @@ use FS::Log;
&untaint_argv; #what it sounds like (eww)
use vars qw(%opt);
-getopts("p:a:d:vl:sy:nmrkg:o", \%opt);
+getopts("p:a:d:vl:sy:nmrkg:ox", \%opt);
my $user = shift or die &usage;
adminsuidsetup $user;
@@ -87,9 +87,9 @@ use FS::Cron::cleanup qw( cleanup cleanup_before_backup );
cleanup_before_backup();
#backup should be last
-#you can skip this just by not having the config
+#you can skip this just by not having the config (or with the -x option)
use FS::Cron::backup qw(backup);
-backup();
+backup() unless $opt{'x'};
#except we'd rather not start cleanup jobs until the backup is done
cleanup();
@@ -110,7 +110,7 @@ sub untaint_argv {
}
sub usage {
- die "Usage:\n\n freeside-daily [ -d 'date' ] [ -y days ] [ -p 'payby' ] [ -a agentnum,agentnum,... ] [ -s ] [ -v ] [ -l level ] [ -m ] [ -k ] user [ custnum custnum ... ]\n";
+ die "Usage:\n\n freeside-daily [ -d 'date' ] [ -y days ] [ -p 'payby' ] [ -a agentnum,agentnum,... ] [ -s ] [ -v ] [ -l level ] [ -m ] [ -k ] [ -x ] user [ custnum custnum ... ]\n";
}
###
@@ -166,7 +166,9 @@ the bill and collect methods of a cust_main object. See L<FS::cust_main>.
-k: skip notify_flat_delay
-user: From the mapsecrets file - see config.html from the base documentation
+ -x: skip backup
+
+user: Typically "fs_daily"
custnum: if one or more customer numbers are specified, only bills those
customers. Otherwise, bills all customers.
-----------------------------------------------------------------------
Summary of changes:
FS/bin/freeside-daily | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
More information about the freeside-commits
mailing list