mirror of
https://github.com/anten-ka/gotelegram_pro.git
synced 2026-05-19 14:26:02 +00:00
Bug report: 'статистика не работает' — submenu_stats showed the 'stats module missing' fallback even though gotelegram-stats.service was active. Root cause: bootstrap.sh FILES[] never included lib/stats.sh, so on every (re)install the file was absent from /opt/gotelegram/lib/ on disk. The running collector was sourcing it from an in-memory bash process from a previous install, but install.sh's `source stats.sh` at menu entry failed silently and hit the 'stats_module_missing' branch. Also: stats_collect silently skipped history writes if stats_history.csv was deleted post-init (only stats_init created it once). Now stats_collect auto-recreates the file with header. - bootstrap.sh: add 'lib/stats.sh' to FILES[] - lib/stats.sh: stats_collect auto-creates HISTORY_FILE if missing Tested live on VPS: show_traffic_stats now outputs real counters (23.1 MB proxy, 10 MB site, 394 KB/s peak).