Skip to content

fix: restart telegram bot after token upload (1.7.3)#32

Merged
agentram merged 1 commit into
mainfrom
release/1.7.3
Jun 24, 2026
Merged

fix: restart telegram bot after token upload (1.7.3)#32
agentram merged 1 commit into
mainfrom
release/1.7.3

Conversation

@alex5416

@alex5416 alex5416 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Bug fix: ovpn server monitor telegram-setup now force-recreates the ovpn-telegram-bot container immediately after uploading the new token file. Previously the bot could start with the old on-disk token during the deploy step, and the subsequent monitor up call left it running with the wrong token since it doesn't use --force-recreate.
  • Docs: Expanded docs/monitoring.md Telegram setup section with step-by-step BotFather bot creation guide and a @RawDataBot tip for finding your numeric owner user ID. Added brief hints to README.md quickstart.
  • Version: bumped to 1.7.3.

Test plan

  • Run ovpn server monitor telegram-setup <server> --token <new-token> --owner-user-id <id> on a server where monitoring is already running with a different token
  • Confirm the bot restarts and the test notification arrives in the correct bot (not the old one)
  • Confirm ovpn server logs <server> --service ovpn-telegram-bot shows the bot polling successfully with no watchdog_unhealthy metric

@alex5416 alex5416 requested a review from agentram as a code owner June 24, 2026 11:10
@agentram agentram force-pushed the release/1.7.3 branch 2 times, most recently from 23d847e to 3c37904 Compare June 24, 2026 12:02
When a bot was already running, ovpn server monitor telegram-setup would
deploy the bundle (force-recreating the container with the old on-disk
token), write the new token file, then call monitor up without
--force-recreate — leaving the bot running with the wrong token.

Added RestartTelegramBotRemote in deploy.go that force-recreates
ovpn-telegram-bot immediately after the token file is written.

Also expanded Telegram setup docs with BotFather and @RawDataBot
guidance. Bumps version to 1.7.3.
@agentram agentram merged commit c63765b into main Jun 24, 2026
6 checks passed
@agentram agentram deleted the release/1.7.3 branch June 24, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants