projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1383b4b
)
add option to disable backup so two runs of freeside-daily with -m don't write to...
author
Ivan Kohler
<ivan@freeside.biz>
Sat, 1 Apr 2017 20:20:12 +0000
(13:20 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Sat, 1 Apr 2017 20:20:12 +0000
(13:20 -0700)
FS/bin/freeside-daily
patch
|
blob
|
history
diff --git
a/FS/bin/freeside-daily
b/FS/bin/freeside-daily
index
8d195a8
..
e0c555f
100755
(executable)
--- 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);
&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:o
x
", \%opt);
my $user = shift or die &usage;
adminsuidsetup $user;
my $user = shift or die &usage;
adminsuidsetup $user;
@@
-100,9
+100,9
@@
use FS::Cron::cleanup qw( cleanup cleanup_before_backup );
cleanup_before_backup();
#backup should be last
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);
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( quiet => !$opt{'v'} );
#except we'd rather not start cleanup jobs until the backup is done
cleanup( quiet => !$opt{'v'} );
@@
-123,7
+123,7
@@
sub untaint_argv {
}
sub usage {
}
sub usage {
- die "Usage:\n\n freeside-daily [ -d 'date' ] [ -y days ] [ -a agentnum,agentnum,... ] [ -s ] [ -v ] [ -l level ] [ -m ] [ -k ] user [ custnum custnum ... ]\n";
+ die "Usage:\n\n freeside-daily [ -d 'date' ] [ -y days ] [ -a agentnum,agentnum,... ] [ -s ] [ -v ] [ -l level ] [ -m ] [ -k ]
[ -x ]
user [ custnum custnum ... ]\n";
}
###
}
###
@@
-179,6
+179,8
@@
the bill and collect methods of a cust_main object. See L<FS::cust_main>.
-k: skip notify_flat_delay
-k: skip notify_flat_delay
+ -x: skip backup
+
user: Typically "fs_daily"
custnum: if one or more customer numbers are specified, only bills those
user: Typically "fs_daily"
custnum: if one or more customer numbers are specified, only bills those