Update README.md

This commit is contained in:
justuser-31 2026-03-07 10:04:24 +00:00
parent 8227668906
commit d66880e1ab

View File

@ -1,12 +1,23 @@
# tg_bots_scripts
Scripts for telegram bot for (re)start/stop without pain.
Scripts for telegram bot for (re)start/stop without pain. \
**UNIX-ONLY!!!**
## Usage
1. Put service.py in yours project.
2. Set name of main script - `main.py`
3. Use the `service.py` so:
3. Inject in `main.py`:
```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 <option>
Options: