Skip to content

kakashi0x0/mina

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mina restarter

This is basically a translation of w0rldwind's script. Code unchanged, only translated in English.

Mina will restart when:

  • Node block height is lagging behing, or when,
  • Node stutus is CONNECTING, LISTENING, OFFLINE, BOOTSTRAP, CATCHUP (Set the appropriate time required to load a node in m.sh)

Download scripts

cd
mkdir mrestart && cd mrestart
wget https://raw.githubusercontent.com/Kakashi010/mina/main/m.sh
wget https://raw.githubusercontent.com/Kakashi010/mina/main/alert.py
wget https://raw.githubusercontent.com/Kakashi010/mina/main/id.py

chmod +x m.sh
chmod +x alert.py
chmod +x id.py

Install & Configure

sudo apt update
sudo apt install -y python3-pip jq
pip3 install pyTelegramBotAPI
  1. Register a bot with @BotFather
  2. Add bot token to alert.py and id.py
  3. Run python3 id.py and write "ID" to your bot. Add the received ID to alert.py (tgid) If you are setting up alert for multiple nodes but want the alerts in the same chat then you only need to run this command once on the first node you configure.
  4. Setup a scheduler
    • Insert the below line in crontab -e
*/5 * * * * cd ~/mrestart && ./m.sh

Settings in file- m.sh

  • Edit Node name as you prefer
  • Customize api (if required)
  • Edit the "time" required to load a node
  • Add restart and additional commands

Thanks to w0rldwind for the original scripts!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 71.8%
  • Python 28.2%