]>
Commit | Line | Data |
---|---|---|
832c594d MG |
1 | #!/usr/bin/perl |
2 | use v5.14; | |
3 | use warnings; | |
4 | ||
5 | use App::RemoteGnokii; | |
6 | use File::Slurp qw/slurp/; | |
7 | ||
8 | App::RemoteGnokii::action(@ARGV[0 .. 1], slurp \*STDIN); | |
9 | __END__ | |
10 | ||
11 | =encoding utf-8 | |
12 | ||
13 | =head1 NAME | |
14 | ||
15 | rg-action - gnokii-smsd action that forwards messages | |
16 | ||
17 | =head1 SYNOPSIS | |
18 | ||
19 | smsd -m file -u /path/to/rg-action ... | |
20 | ||
21 | =head1 DESCRIPTION | |
22 | ||
23 | This script is a gnokii-smsd action that forwards each received mesage to a given number. | |
24 | ||
25 | =head1 MESSAGE FORMAT | |
26 | ||
27 | $password | |
28 | $originating_number | |
29 | $date_received | |
30 | $message_text | |
31 | ||
32 | The first line is the password (from the configuration file), the second is the phone number of the sender, the third is the date when the message was received, and the fourth (and later) lines are the message text. | |
33 | ||
34 | =head1 ENVIRONMENT | |
35 | ||
36 | =over | |
37 | ||
38 | =item RGCONF | |
39 | ||
40 | The basename of the configuration file. For example, if the configuration file is '/srv/rg/config.yml', RGCONF should be set to '/srv/rg/config'. Defaults to '/etc/rg'. | |
41 | ||
42 | =back | |
43 | ||
44 | =head1 SEE ALSO | |
45 | ||
46 | L<App::RemoteGnokii> | |
47 | ||
48 | =head1 AUTHOR | |
49 | ||
50 | Marius Gavrilescu E<lt>marius@ieval.roE<gt> | |
51 | ||
52 | =head1 COPYRIGHT AND LICENSE | |
53 | ||
54 | Copyright (C) 2014 by Marius Gavrilescu | |
55 | ||
56 | This library is free software: you can redistribute it and/or modify | |
57 | it under the terms of the GNU General Public License as published by | |
58 | the Free Software Foundation, either version 3 of the License, or (at | |
59 | your option) any later version. | |
60 | ||
61 | ||
62 | =cut |