-
-
Notifications
You must be signed in to change notification settings - Fork 170
/
scdlbot.service.sample
43 lines (40 loc) · 1.21 KB
/
scdlbot.service.sample
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
33
34
35
36
37
38
39
40
41
42
43
# This is systemd service file. How to install service:
# sudo cp scdlbot.service.sample /etc/systemd/system/scdlbot.service
# sudo nano /etc/systemd/system/scdlbot.service
# sudo systemctl daemon-reload
# sudo systemctl enable scdlbot
# sudo systemctl restart scdlbot
# sudo systemctl status scdlbot
[Unit]
Description=scdlbot
After=network.target
[Service]
# https://manpages.ubuntu.com/manpages/bionic/man5/systemd.service.5.html
# https://www.freedesktop.org/software/systemd/man/systemd.service.html
# https://manpages.ubuntu.com/manpages/bionic/man5/systemd.resource-control.5.html
# https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html
User=www-data
Group=www-data
Type=simple
EnvironmentFile=/etc/default/scdlbot
#Environment=SYSTEMD_LOG_LEVEL=debug
#ExecStartPre=-rm -rf /scdlbothome/scdlbotdata.pickle
#ExecStartPre=/usr/bin/pkill -f python3.11
#ExecStart=/opt/pyenv/versions/3.11.5/bin/scdlbot
ExecStart=/usr/local/bin/scdlbot
WatchdogSec=180
#WatchdogSignal=SIGKILL
#KillMode=mixed
NotifyAccess=all
Restart=always
RestartSec=5
CPUQuotaPeriodSec=1000ms
# 3 vCPU:
CPUQuota=250%
# 4 GB RAM:
MemoryHigh=2800M
MemoryMax=3000M
TasksMax=infinity
LimitNOFILE=1048576
[Install]
WantedBy=multi-user.target