diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2020-02-27 17:24:33 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2020-02-27 17:40:57 +0200 |
commit | f08fb73d6ab98b26e738d89b59f21c2f72b432a6 (patch) | |
tree | f88790a80b9403c6afc8d8c4e149293b098ca814 /examples/README | |
parent | a7d03cd5f6ab8884ee2f2ef89c3e514c811c2c9f (diff) | |
download | ping903-f08fb73d6ab98b26e738d89b59f21c2f72b432a6.tar.gz ping903-f08fb73d6ab98b26e738d89b59f21c2f72b432a6.tar.bz2 |
Add missing copylefts; improve docs
Diffstat (limited to 'examples/README')
-rw-r--r-- | examples/README | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/examples/README b/examples/README new file mode 100644 index 0000000..f5a1c50 --- /dev/null +++ b/examples/README @@ -0,0 +1,47 @@ +* Overview + +This directory contains example Perl scripts that access ping903 +facilities via REST API. You can use them as templates for writing +your own configuration system, or just run them as they are, if you +prefer. + +* Programs + + - inspect + Queries the daemon for its configuration settings and displays + them on stdout in the format of ping903 configuration file. + + - ipadd + Adds IP address to the list of addresses monitored by ping903. + + - ipdel + Removes IP address from the list of monitored addresses. + + - dbload + Populates the list of monitored addresses from a SQL database. + +All these programs use the LWP::Ping903 module, which provides support +for parsing the ".ping903.cred" file. The source file for the module is +lib/LWP/Ping903.pm. To run the programs from the examples directory, +define the following environment variable: + + export PERL5LIB=lib + +If you don't plan to use basic authorization, you can get rid of this +dependency using the following command: + + sed -i 's/LWP::Ping903/LWP::UserAgent/' inspect ipadd ipdel dbload + +* Documentation + +Each example is self-documented. To access the description, run the +script with the --help option, or do "perldoc PROG". + + +Local Variables: +mode: outline +paragraph-separate: "[ ]*$" +version-control: never +End: + + |