-
Notifications
You must be signed in to change notification settings - Fork 4
/
bot.service
32 lines (30 loc) · 909 Bytes
/
bot.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[Unit]
Description=the Telegram bot
Requires=network.target
After=network.target
StartLimitBurst=5
StartLimitIntervalSec=33
[Service]
Type=simple
User=bot
RestartSec=5
Environment="OC_URL=https://cloud.example.com/"
Environment="OC_USER=bot"
Environment="OC_PWD=f00b4r"
Environment="LOG_BASE=Weeelab/"
Environment="LOG_PATH=Weeelab/log.txt"
Environment="TOLAB_PATH=Weeelab/tolab.json"
Environment="USER_BOT_PATH=Weeelab/user.txt"
Environment="USER_PATH=Weeelab/users.json"
Environment="TARALLO=https://tarallo.com"
Environment="BOT_USER=bot"
Environment="BOT_PSW=f00b4r2"
Environment="TOKEN_BOT=1234:f00f00f00f00f00f00f00f00f00f00f00"
WorkingDirectory=/home/bot/weeelab-telegram-bot
ExecStart=/home/bot/weeelab-telegram-bot/venv/bin/python -m /home/bot/weeelab-telegram-bot/weeelab_bot.py
Restart=on-failure
StandardOutput=journal
StandardError=journal
IPAccounting=yes
[Install]
WantedBy=multi-user.target