From d41ecd987762ef3e0fb0699c2563606526f52bf0 Mon Sep 17 00:00:00 2001 From: AIOSAI Date: Wed, 24 Jun 2026 17:28:44 -0700 Subject: [PATCH] fix(skills,ops): deploy @aipass telegram bot under systemd + fix unit log path The ported telegram-bot@.service logged to a non-existent ~/system_logs (would crash-loop the service); point StandardOutput/StandardError at /system_logs where the app already logs. Then installed the unit, enable --now + loginctl enable-linger so the @aipass mother-bot runs as a proper user service with reboot survival and a one-line restart. Startup log confirms: Telegram API OK, Command menu set (6 commands), poll loop, tmux session preserved, NRestarts=0. DPLAN-0220 --- CHANGELOG.md | 12 ++++++++++++ src/aipass/skills/lib/telegram/telegram-bot@.service | 4 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3efa9500..21da5a05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,6 +70,18 @@ PyPI version — not the changelog header. startup menu.) (DPLAN-0220) +- **Telegram `@aipass` deployed under systemd (reboot survival + clean lifecycle)** — + the live mother-bot was a hand-launched foreground process: no reboot survival, and + `stop_bot`/restart targeted an uninstalled `telegram-bot@base` unit, so there was no + working lifecycle command. Installed the user service + `enable --now` + + `loginctl enable-linger` (`Linger=yes`); the 17:26 startup log confirms the full + chain live — `Telegram API OK`, **`Command menu set (6 commands)`** (the new `/help` + menu), stale-lock cleanup, poll loop, tmux Claude session preserved, `NRestarts=0`. + Also corrected the ported unit's `StandardOutput`/`StandardError`, which pointed at a + non-existent `~/system_logs` (would have crash-looped the service) — now + `/system_logs`, matching where the app already logs. Restart is now + `systemctl --user restart telegram-bot@base`. (DPLAN-0220) + - **seedgo CLI help checkers green-lit non-compliant `--help` output** — the `cli`/`help_text`/`introspection` standards are static source scans (they confirm a `print_help` function, `console.print`, and `--help` wiring exist) diff --git a/src/aipass/skills/lib/telegram/telegram-bot@.service b/src/aipass/skills/lib/telegram/telegram-bot@.service index f668477d..8fa27af4 100644 --- a/src/aipass/skills/lib/telegram/telegram-bot@.service +++ b/src/aipass/skills/lib/telegram/telegram-bot@.service @@ -25,8 +25,8 @@ Environment=AIPASS_BOT_ID=%i Environment=AIPASS_SESSION_TYPE=telegram Restart=on-failure RestartSec=10 -StandardOutput=append:%h/system_logs/telegram-bot-%i.log -StandardError=append:%h/system_logs/telegram-bot-%i.log +StandardOutput=append:%h/Projects/AIPass/system_logs/telegram-bot-%i.log +StandardError=append:%h/Projects/AIPass/system_logs/telegram-bot-%i.log [Install] WantedBy=default.target