projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c658c66
)
correct place for use Email::Send, RT#4610
author
ivan
<ivan>
Mon, 28 Sep 2009 22:35:35 +0000
(22:35 +0000)
committer
ivan
<ivan>
Mon, 28 Sep 2009 22:35:35 +0000
(22:35 +0000)
FS/FS/Cron/check.pm
patch
|
blob
|
history
FS/bin/freeside-check
patch
|
blob
|
history
diff --git
a/FS/FS/Cron/check.pm
b/FS/FS/Cron/check.pm
index
1474c2c
..
a7903ce
100644
(file)
--- a/
FS/FS/Cron/check.pm
+++ b/
FS/FS/Cron/check.pm
@@
-6,6
+6,7
@@
use vars qw( @ISA @EXPORT_OK $DEBUG $FS_RUN $error_msg
);
use Exporter;
use LWP::UserAgent;
);
use Exporter;
use LWP::UserAgent;
+use Email::Send;
use FS::Conf;
use FS::Record qw(qsearch);
use FS::cust_pay_pending;
use FS::Conf;
use FS::Record qw(qsearch);
use FS::cust_pay_pending;
diff --git
a/FS/bin/freeside-check
b/FS/bin/freeside-check
index
ac2fc3d
..
9c9da76
100644
(file)
--- a/
FS/bin/freeside-check
+++ b/
FS/bin/freeside-check
@@
-2,7
+2,6
@@
#!/usr/bin/perl -w
use strict;
#!/usr/bin/perl -w
use strict;
-use Email::Send;
use FS::UID qw( adminsuidsetup );
use FS::Cron::check qw(
check_queued check_selfservice check_apache check_bop_failures
use FS::UID qw( adminsuidsetup );
use FS::Cron::check qw(
check_queued check_selfservice check_apache check_bop_failures
@@
-23,8
+22,9
@@
check_selfservice or alert(error_msg(), @emails);
check_apache or alert('Apache not running: '. error_msg(), @emails);
#no-ops unless you are sg
check_apache or alert('Apache not running: '. error_msg(), @emails);
#no-ops unless you are sg
-check_sg or alert('FS::ClientAPI::SG not responding', @emails);
-check_sgng or alert('FS::ClientAPI::SGNG not responding', @emails);
+my $sg = 'FS::ClientAPI::SG';
+check_sg or alert("$sg not responding: ". error_msg(), @emails);
+check_sgng or alert("${sg}NG not responding: ". error_msg(), @emails);
check_bop_failures or alert(error_msg(), @emails);
check_bop_failures or alert(error_msg(), @emails);