So, I needed some simple scripts that will check if my Crypto Node is running in my VPS and if not send me an alert in Telegram. I had to create TG BOT with BotFather ( https://t.me/BotFather ) first.
Remember to update the BOT_ID & BOT_TOKEN in the scripts, also update the Crypto Node File Name and Location.
I'm running 2 Scripts:
Will check the status of the Node and if it is other than 'active', it will send me messages every 2 minutes for 3 times. After that, it will sleep for 3 hours and will start over again. If in these 3 hours the status will change to 'active' it will send me a TG message and return to the start of the script.
Will check that the first script is running & message me if it's not.
Last thing - update crontab so the scripts will run on reboot.
probably there are "pretty" ways to write that, but this is what I managed to come up with in the time I had.
Feel Free To Use/Modify and so on...