Skip to content

cyberomanov/status-nym

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NYM

this system will alert you with telegram about your mixnode/s status.
donations are welcome, if you find this tool helpful.

Contents

  1. Screenshots
  2. Installation
  3. Update

Screenshots

Log example:

image

image

Alarm example:

image

image

Installation

  1. Create telegram bot via @BotFather, customize it and get bot_API_token (how_to).
  2. Create at least 2 chats: alarm and log. Customize them, add your bot into this chats and get chat_IDs (how_to).
  3. Connect to your server where you plan to install nym-status-system.
  4. Install python3.10 or newer:
# one-line-command
sudo apt-get update && \
sudo apt-get upgrade -y && \
sudo apt install software-properties-common tmux curl git -y && \
sudo add-apt-repository ppa:deadsnakes/ppa && \
sudo apt-get install python3.10 python3-pip -y && \
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1; \
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2; \
sudo update-alternatives --config python3 && \
sudo apt-get install python3-distutils && \
sudo apt-get install python3-apt && \
sudo apt install python3.10-distutils -y && \
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 && \
sudo apt-get install python3.10-dev -y && \
pip3 install --ignore-installed PyYAML && \
python3 -V

>>> Python 3.10.9
  1. Clone this repository:
cd ~/ && \
git clone https://github.com/cyberomanov/status-nym.git status-nym && \
cd ~/status-nym/
  1. Install requirements:
pip3 install -r ~/status-nym/requirements.txt
  1. Edit config.yaml:
nano ~/status-nym/config.yaml
  1. Run the nym.py to check you config settings:
python3 nym.py
  1. If all seems okay, then edit your crontab with crontab -e:
# nym
*/10 * * * * cd /root/status-nym/ && /usr/bin/python3 nym.py

check your logs in 5-10-15 minutes here: ~/status-nym/log/nym.log


Update

  1. backup your config:
cp ~/status-nym/config.yaml ~/config_temp.yaml
  1. pull changes from the repository:
cd ~/status-nym/ && \
git fetch && \
git reset --hard && \
git pull
  1. print a new default config:
cat ~/status-nym/config.yaml
  1. restore your previous config, ONLY if there is no breaking changes, else edit the new file:
nano ~/status-nym/config.yaml

OR

mv ~/config_temp.yaml ~/status-nym/config.yaml
  1. Install requirements:
pip3 install -r ~/status-nym/requirements.txt
  1. Run the nym.py to check you config settings:
python3 nym.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages