refactor(telegram-bot): update telegram-bot installer (#251)

This commit is contained in:
th33xitus
2022-10-30 18:30:20 +01:00
committed by GitHub
parent 6116fc92cf
commit 811c071b74
5 changed files with 111 additions and 47 deletions

View File

@@ -1,19 +1,17 @@
#Systemd service file for Moonraker Telegram Bot
[Unit]
Description=Starts Moonraker Telegram Bot instance %INST% on startup
Description=Moonraker Telegram Bot SV1 %INST%
Documentation=https://github.com/nlef/moonraker-telegram-bot/wiki
After=network.target
After=network-online.target
[Install]
WantedBy=multi-user.target
[Service]
Environment=TELEGRAM_CONF=%CFG%
Environment=TELEGRAM_LOG=%LOG%
Type=simple
User=%USER%
RemainAfterExit=yes
ExecStart=%ENV%/bin/python %DIR%/bot/main.py -c ${TELEGRAM_CONF} -l ${TELEGRAM_LOG}
WorkingDirectory=/home/%USER%/moonraker-telegram-bot
EnvironmentFile=%ENV_FILE%
ExecStart=%ENV%/bin/python $TELEGRAM_BOT_ARGS
Restart=always
RestartSec=10