Lines 34-39
my $help = 0;
Link Here
|
34 |
my $verbose = 0; |
34 |
my $verbose = 0; |
35 |
my $type = q{}; |
35 |
my $type = q{}; |
36 |
my $letter_code; |
36 |
my $letter_code; |
|
|
37 |
my $exit_on_plugin_failure = 0; |
37 |
|
38 |
|
38 |
GetOptions( |
39 |
GetOptions( |
39 |
'u|username:s' => \$username, |
40 |
'u|username:s' => \$username, |
Lines 44-49
GetOptions(
Link Here
|
44 |
'v|verbose' => \$verbose, |
45 |
'v|verbose' => \$verbose, |
45 |
't|type:s' => \$type, |
46 |
't|type:s' => \$type, |
46 |
'c|code:s' => \$letter_code, |
47 |
'c|code:s' => \$letter_code, |
|
|
48 |
'e|exit-on-plugin-failure' => \$exit_on_plugin_failure, |
47 |
); |
49 |
); |
48 |
my $usage = << 'ENDUSAGE'; |
50 |
my $usage = << 'ENDUSAGE'; |
49 |
|
51 |
|
Lines 62-67
This script has the following parameters :
Link Here
|
62 |
-m --method: authentication method required by SMTP server (See perldoc Sendmail.pm for supported authentication types.) |
64 |
-m --method: authentication method required by SMTP server (See perldoc Sendmail.pm for supported authentication types.) |
63 |
-h --help: this message |
65 |
-h --help: this message |
64 |
-v --verbose: provides verbose output to STDOUT |
66 |
-v --verbose: provides verbose output to STDOUT |
|
|
67 |
-e --exit-on-plugin-failure: if enabled, script will exit prematurely if any plugin before_send_messages hook fails |
65 |
ENDUSAGE |
68 |
ENDUSAGE |
66 |
|
69 |
|
67 |
die $usage if $help; |
70 |
die $usage if $help; |
Lines 87-92
if ( C4::Context->config("enable_plugins") ) {
Link Here
|
87 |
} |
90 |
} |
88 |
catch { |
91 |
catch { |
89 |
warn "$_"; |
92 |
warn "$_"; |
|
|
93 |
exit 1 if $exit_on_plugin_failure; |
90 |
}; |
94 |
}; |
91 |
} |
95 |
} |
92 |
} |
96 |
} |
93 |
- |
|
|