For context, I host my bot on my Raspberry, at my house. Sometimes, I lost electricity, and the server restart. Obviously, I configured pm2 to restart all… But, obviously, internet return some times after the power's return.
How can I configure pm2 or the bot to restart when internet is regained? For example, trying to connect each 1min until success, maybe?
Thank you!