# tg_bots_scripts Scripts for telegram bot for (re)start/stop without pain. \ **UNIX-ONLY!!!** ## Examples In repository you see examples: * main.py - your main file * example.sh - optional script for checking exit code (not needed) `service.py` is the what you will use for managment of `main.py` ## Usage 1. Put service.py in yours project. 2. Set name of main script - `main.py` 3. Inject in `main.py` AT THE BEGINNING: ```python import os # Process Identification Number (PID in Unix(-like)) pid = os.getpid() with open("pid.txt", "w") as f: f.write(str(pid)) ``` 4. Use the `service.py` so: ```bash Usage: python service.py