16.58. taler-mdb-network-check.sh(1)¶
16.58.1. Name¶
taler-mdb-network-check.sh - Taler multi-drop bus vending machine network check tool
16.58.2. Synopsis¶
taler-mdb-network-check.sh [-c FILENAME] [-f FAIL_HELPER] [-h] – PROGRAM
16.58.3. 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.
16.58.4. 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
16.58.5. See Also¶
taler-mdb(1), taler-mdb-show.sh(1), taler-mdb.conf(5).
16.58.6. Bugs¶
Report bugs by using https://bugs.taler.net or by sending electronic mail to <taler@gnu.org>.