Fixed typo in Unit file

Unit description was tg_spotdl from a copy and paste mistake.
This commit is contained in:
Clarth 2024-01-02 17:28:24 -05:00
parent 3cd1137b84
commit 1bd0ae824e
1 changed files with 58 additions and 58 deletions

116
README.md
View File

@ -1,58 +1,58 @@
<img src="https://i.imgur.com/Q8K4Ujn.jpg" alt="Centered Image" width="300" height="300"> <img src="https://i.imgur.com/Q8K4Ujn.jpg" alt="Centered Image" width="300" height="300">
# Set Up Guide # Set Up Guide
1. Install cups 1. Install cups
`sudo apt install cups` `sudo apt install cups`
2. Create a python virtual environment 2. Create a python virtual environment
`python3 -m venv /absolute/path/to/venv` `python3 -m venv /absolute/path/to/venv`
3. Install depends in venv 3. Install depends in venv
`/absolute/path/to/venv/bin/pip3 install pyTelegramBotAPI` or `/absolute/path/to/venv/bin/pip install pyTelegramBotAPI==4.14.0` `/absolute/path/to/venv/bin/pip3 install pyTelegramBotAPI` or `/absolute/path/to/venv/bin/pip install pyTelegramBotAPI==4.14.0`
4. Edit tg_print.py with correct telegram API token and change directories variables. 4. Edit tg_print.py with correct telegram API token and change directories variables.
5. Start the script 5. Start the script
`/absolute/path/to/venv/bin/python tg_print.py` `/absolute/path/to/venv/bin/python tg_print.py`
## Unit file ## Unit file
``` ```
[Unit] [Unit]
Description=tg_spotdl Description=tg_print_bot
After=network-online.target After=network-online.target
[Service] [Service]
User=nobody User=nobody
ExecStart=/absolute/path/to/venv/bin/python /absolute/path/to/start.py ExecStart=/absolute/path/to/venv/bin/python /absolute/path/to/start.py
Restart=always Restart=always
RestartSec=5s RestartSec=5s
RuntimeMaxSec=12h RuntimeMaxSec=12h
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
``` ```
## Start Script ## Start Script
Recommend running in a screen or tmux. Recommend running in a screen or tmux.
``` ```
#!/bin/bash #!/bin/bash
/absolute/path/to/venv/bin/python /absolute/path/to/start.py /absolute/path/to/venv/bin/python /absolute/path/to/start.py
exit exit
``` ```
# Usage # Usage
1. Send a file to the chat or directly to the bot in a PM. 1. Send a file to the chat or directly to the bot in a PM.
2. Collect paper from the printer. 2. Collect paper from the printer.
## Useful Links ## Useful Links
https://github.com/eternnoir/pyTelegramBotAPI https://github.com/eternnoir/pyTelegramBotAPI