From d66880e1ab1c5ce27d50e5f3110e5dc974f7912d Mon Sep 17 00:00:00 2001 From: justuser-31 Date: Sat, 7 Mar 2026 10:04:24 +0000 Subject: [PATCH] Update README.md --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6034e0c..917f316 100644 --- a/README.md +++ b/README.md @@ -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