TALER-MDB-NETWORK-CHECK.SH(1)

NAME
taler-mdb-network-check.sh - handle network checks on vending machines

SYNOPSIS

taler-mdb-network-check.sh [-c FILENAME] [-f FAIL_HELPER] [-h] -- PROGRAM

DESCRIPTION

taler-mdb-network-check.sh is a command-line tool to call a program when the network goes down. It depends on dig.

Its options are as follows:

-c FILENAME
    Use the configuration and other resources for the command to operate from FILENAME.

-f FAIL_HELPER
    Overwrites the Taler config's FAIL_HELPER value. See taler-mdb.conf(5)

-h  Print short help on options.

    When the network goes down, it will kill PROGRAM, then call FAIL_HELPER with one of the following error codes (followed by killing FAIL_HELPER and relaunching PROGRAM once the network is up again) - note that we check in the order these are listed:

no-ip
    Network Down: Could not reach the DNS Server. (DNS Server is first nameserver entry in /etc/resolv.conf.)

backend-dns-resolution-failure
    Name Resolution Failed: Could not resolve the Taler backend hostname. Check DNS. (dig picks its own nameservers; we do not force it to use the one we pinged.)

backend-unreachable
    Backend Unreachable: Could not reach payment backend.

backend-no-webserver
    Backend No Webserver: We cannot find a webserver on a backend. Ensure requests are properly routing to it. (X509 certificate is not verified here.)

backend-x509-cert-bad
    Bad Certificate: The Taler backend gave us a bad TLS certificate. Check the X509 setup.

backend-auth-failure
    Backend Authentication Failure: The credentials are invalid. Check your configuration.

    The aforementioned FAIL_HELPER also gets called if the network is not up in the first place.

    In short, FAIL_HELPER will be running whenever the network is down, and PROGRAM will be running whenever its up.

    The network is checked every 30 seconds.

EXAMPLE

A canonical use of the script to launch taler-mdb would be:

    # /usr/bin/taler-mdb-network-check.sh -c /etc/taler-mdb.conf -- \
      /usr/bin/taler-mdb -c /etc/taler-mdb.conf

SEE ALSO

taler-mdb(1), taler-mdb-show.sh(1), taler-mdb.conf(5).

BUGS

Report bugs by using https://bugs.taler.net or by sending electronic mail to <taler@gnu.org>.

AUTHOR
GNU Taler contributors

COPYRIGHT
2014-2025 Taler Systems SA (GPLv3+ or GFDL 1.3+)