equal
deleted
inserted
replaced
1 #!/usr/bin/perl |
1 #!/usr/bin/perl |
|
2 |
|
3 =encoding utf8 |
|
4 |
|
5 =cut |
2 |
6 |
3 use warnings; |
7 use warnings; |
4 use strict; |
8 use strict; |
5 |
9 |
6 use IO::File; |
10 use IO::File; |
7 use IPC::Run qw(run); |
11 use IPC::Run qw(run); |
|
12 use Getopt::Long; |
8 use Mail::Sendmail; |
13 use Mail::Sendmail; |
|
14 use Pod::Usage; |
9 use Sys::Hostname::Long; |
15 use Sys::Hostname::Long; |
|
16 |
|
17 GetOptions( |
|
18 "h|help" => sub { pod2usage(-exit => 0, -verbose => 1) }, |
|
19 "m|man" => sub { |
|
20 pod2usage( |
|
21 -exit => 0, |
|
22 -verbose => 2, |
|
23 |
|
24 # "system('perldoc -V &>/dev/null')" appears shorter, but may not |
|
25 # do what you expect ( it still returns 0 on debian squeeze with |
|
26 # dash as system shell even if cannot find the command in $PATH) |
|
27 -noperldoc => system('perldoc -V >/dev/null 2>&1') |
|
28 ); |
|
29 } |
|
30 ) or pod2usage; |
10 |
31 |
11 my $hostname = hostname_long; |
32 my $hostname = hostname_long; |
12 for (*STDERR, *STDOUT) { select $_; $|=1; } |
33 for (*STDERR, *STDOUT) { select $_; $|=1; } |
13 |
34 |
14 # see man reprepro |
35 # see man reprepro |
365 |
386 |
366 =head1 NAME |
387 =head1 NAME |
367 |
388 |
368 rpi - a wrapper around B<reprepro processincoming> |
389 rpi - a wrapper around B<reprepro processincoming> |
369 |
390 |
|
391 =head1 SYNOPSIS |
|
392 |
|
393 rpi |
|
394 |
|
395 rpi -m|--man |
|
396 -h|--help |
|
397 |
370 =head1 DESCRIPTION |
398 =head1 DESCRIPTION |
371 |
399 |
372 Until B<reprepro> supports a better mechanism for sending notifications for |
400 Until B<reprepro> supports a better mechanism for sending notifications for |
373 rejected packages we just execute B<reprepro processincoming> and parse its |
401 rejected packages we just execute B<reprepro processincoming> and parse its |
374 stdout and its stderr. Everything matching C<$important> patterns will be sent |
402 stdout and its stderr. Everything matching C<$important> patterns will be sent |
383 C<$unimportant> regular expression will not be sent to anyone. If we cant |
411 C<$unimportant> regular expression will not be sent to anyone. If we cant |
384 determine anyone to send the notification to we will try to send it to the |
412 determine anyone to send the notification to we will try to send it to the |
385 C<$fallback> address. Anything matching none of the defined patterns will be |
413 C<$fallback> address. Anything matching none of the defined patterns will be |
386 sent to the C<$fallback> address too. Everything will be printed to stdout. |
414 sent to the C<$fallback> address too. Everything will be printed to stdout. |
387 |
415 |
|
416 =head1 AUTHORS |
|
417 |
|
418 Matthias Förste L<<foerste@schlittermann.de>> |
|
419 |
388 =cut |
420 =cut |