Scripts for automate XX node and gateway restarts
- Create telegram bot and get Api Token (via @BotFather in telegram)
- Send to your new bot command /start
- Clone repo to your node and gateway
cd $HOME && git clone -v https://github.com/ama31337/xxtips.git
- Edit Send_msg_toTelBot.sh with your bot API and your telegram id on both machines
- Edit online_check.sh with your node URL
- Add your user to sudoers to execute node restart w/o password prompt
sudo echo "$USER ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
- Run script to create crontab tasks on node
cd $HOME/xxtips/scripts && ./add_to_cron_node.sh
and on gateway
cd $HOME/xxtips/scripts && ./add_to_cron_gateway.sh
- Check crontab
crontab -l
- Done