Root cause of stale intro payments: koopa max-ladder minted but accept-uri failed with taler-wallet-cli not found (SKIP_ACCEPT ×16). Fail early without CLI/helper; after bank transfer_done keep polling + run-pending for available coins; pay wait 180s; host-agent max-ladder sets WALLET_CLI PATH.
48 lines
2 KiB
Bash
Executable file
48 lines
2 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# run-max-ladder-monitoring.sh — GOA max-search amount ladder → public HTML
|
|
#
|
|
# Public (landing hosts, same Caddy /monitoring* static root):
|
|
# https://{bank,exchange,taler}.hacktivism.ch/monitoring-max-ladder/
|
|
# https://{bank,exchange,taler}.hacktivism.ch/monitoring-max-ladder_err/
|
|
#
|
|
# Timer: once daily (taler-monitoring-max-ladder.timer). Long wall clock.
|
|
#
|
|
set -uo pipefail
|
|
AGENT_DIR=$(cd "$(dirname "$0")" && pwd)
|
|
|
|
export AGENT_LABEL="${AGENT_LABEL:-max-ladder-host-agent}"
|
|
export STATE_NAME="${STATE_NAME:-taler-max-ladder-monitoring}"
|
|
export TALER_DOMAIN="${TALER_DOMAIN:-hacktivism.ch}"
|
|
export TALER_MON_LANG="${TALER_MON_LANG:-en}"
|
|
export TALER_MON_LANG_SET=1
|
|
export INSIDE_PODMAN="${INSIDE_PODMAN:-1}"
|
|
export INSIDE_MODE="${INSIDE_MODE:-local-podman}"
|
|
export LOCAL_STACK="${LOCAL_STACK:-1}"
|
|
export SKIP_SSH="${SKIP_SSH:-0}"
|
|
export CONTINUE_ON_ERROR="${CONTINUE_ON_ERROR:-1}"
|
|
# max-search probes + pay hunt — force high wall clock (koopa env often has RUN_TIMEOUT=600)
|
|
export RUN_TIMEOUT="${MAX_LADDER_RUN_TIMEOUT:-10800}"
|
|
|
|
export PHASES="max-ladder monpages"
|
|
export MON_HOSTS="${MON_HOSTS:-bank.hacktivism.ch exchange.hacktivism.ch taler.hacktivism.ch}"
|
|
export HTML_OUT="${HTML_OUT:-$HOME/monitoring-sites-staging}"
|
|
export DEPLOY_WWW_ROOT="${DEPLOY_WWW_ROOT:-/var/www/monitoring-sites}"
|
|
|
|
export HTML_OK_DIR="monitoring-max-ladder"
|
|
export HTML_ERR_DIR="monitoring-max-ladder_err"
|
|
export HTML_URL_OK="/monitoring-max-ladder/"
|
|
export HTML_URL_ERR="/monitoring-max-ladder_err/"
|
|
export PAGE_LABEL="monitoring-max-ladder"
|
|
export MONPAGES_INVENTORY="job"
|
|
|
|
export LADDER_MODE=max
|
|
export LADDER_PAY="${LADDER_PAY:-1}"
|
|
export LADDER_PAY_WAIT_AVAILABLE_S="${LADDER_PAY_WAIT_AVAILABLE_S:-180}"
|
|
export APT_DEPLOY_ENSURE=0
|
|
# Prefer host wallet-cli install used by mon (find_wallet_cli / WALLET_CLI)
|
|
export PATH="${HOME}/.local/bin:${PATH:-}"
|
|
if [ -z "${WALLET_CLI:-}" ] && [ -f "${HOME}/.local/bin/taler-wallet-cli.mjs" ]; then
|
|
export WALLET_CLI="${HOME}/.local/bin/taler-wallet-cli.mjs"
|
|
fi
|
|
|
|
exec bash "$AGENT_DIR/run-host-report.sh" "$@"
|