Files
infra/stacks/rpi-tg-export/systemd/tg-export.service
T

24 lines
1.9 KiB
Desktop File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[Unit]
Description=Telegram: докачка истории второго аккаунта владельца (только текст) и индекс для поиска
Wants=network-online.target
After=network-online.target
RequiresMountsFor=/mnt/backup
[Service]
Type=oneshot
User=tgexport
Group=tgexport
# файлы выгрузки 640, каталог setgid astra — Astra читает, остальные пользователи малины нет
UMask=0027
Nice=10
# первый прогон долгий: Telegram троттлит чтение истории (FloodWait), скрипт ждёт сам
TimeoutStartSec=infinity
# все кипрские группы и каналы (владелец 2026-10-18): в названии «кипр»/«cyprus» (подстрока, без регистра — новые кипрские
# группы подхватываются сами) + явные @username без этих слов; только группы/каналы — не личные и не боты (@CyprusCarBot).
# Не вступивший чат --only просто не находит — подтянется после вступления.
# -1001315261949 — Cyprus Car – Chat (без username). История — с 2024-10-18 (последние 2 года, владелец 2026-10-18).
ExecStart=/usr/local/bin/tg-export run --no-media --archived --since 2024-10-18 --kinds group supergroup channel --only кипр cyprus @cylaw @cymedic @cyprusinet @cyschools @cyvisaorg @cylang @cyprusdiy @CypRusSale @CupRusHelpers @badcyprus @cyprusit @cyprussport -1001315261949
# индекс для поиска и сводки: новые сообщения → куски + эмбеддинги (/mnt/backup/tg/index.db)
ExecStartPost=/opt/tg-export/venv/bin/python /opt/tg-export/tgrag.py index --quiet
ExecStopPost=+/usr/local/bin/backup-metrics backup_tg_export