scripts/taler-landing: hernani user systemd timer for central stats

Install path for hernani@koopa: oneshot service plus 2-minute timer that
runs the bank full scan and refreshes exchange/merchant stats via podman.
This commit is contained in:
Hernâni Marques 2026-07-17 07:55:00 +02:00
parent 25695805b4
commit 746d7a41af
No known key found for this signature in database
4 changed files with 108 additions and 0 deletions

View file

@ -0,0 +1,30 @@
[Unit]
Description=Taler landing stats (bank full scan + exchange/merchant)
Documentation=file:%h/src/koopa/koopa-admin-log/scripts/taler-landing/README.md
After=network-online.target
Wants=network-online.target
# Prefer after containers are up (ignore if unit names differ)
After=container-taler-hacktivism-bank.service container-taler-hacktivism.service
After=taler-bank-apps.service taler-merchant-apps.service
[Service]
Type=oneshot
Nice=10
TimeoutStartSec=480
# Do not keep "active" after run — timer may fire again cleanly
RemainAfterExit=no
Environment=TZ=Europe/Zurich
Environment=ADMIN_LOG=%h/src/koopa/koopa-admin-log
Environment=SECRETS_BANK=%h/src/koopa/koopa-admin-secrets/koopa/host-root/taler-bank
Environment=BANK_URL=http://127.0.0.1:9012
Environment=BANK_PUBLIC_URL=https://bank.hacktivism.ch
Environment=EXCHANGE_CONFIG_URL=https://exchange.hacktivism.ch/config
# All accounts except exchange (double-count of withdraw credits on exchange ledger)
Environment=SCAN_SKIP=exchange
Environment=TX_PAGE=500
Environment=MAX_TX_PAGES=0
Environment=ACCOUNTS_DELTA=-10000
ExecStart=%h/.local/bin/collect-landing-stats.sh
[Install]
WantedBy=default.target

View file

@ -0,0 +1,13 @@
[Unit]
Description=Timer · Taler landing stats (every 2 min)
Documentation=file:%h/src/koopa/koopa-admin-log/scripts/taler-landing/README.md
[Timer]
OnBootSec=90s
OnUnitActiveSec=2min
AccuracySec=20s
Persistent=true
Unit=taler-landing-stats.service
[Install]
WantedBy=timers.target