Closed helioloureiro closed 3 years ago
If there is a network problem and the app can't get updates from the Telegram API for timeout time (it's configured for 10 seconds by default), then the app stopped: https://github.com/mxssl/tg-captcha-bot/blob/master/main.go#L68
As a solution, you can add a restart option to your systemd config file:
[Unit]
Description=tg-captcha-bot
Wants=network-online.target
After=network-online.target
[Service]
Environment="TGTOKEN=your_token"
Environment="CONFIG_PATH=/etc/tg-captcha-bot"
Type=simple
ExecStart=/usr/local/bin/tg-captcha-bot
Restart=always
RestartSec=3s
[Install]
WantedBy=multi-user.target
Hi,
Just got this from the logs:
Since it didn't really died at 13:21:18, I had to manually restart the service at 14:18:00. It is running on systemd.