mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 10:03:40 +01:00
Add sample service file
Signed-off-by: nex <me@nexy7574.co.uk>
This commit is contained in:
parent
7bcc441d38
commit
a0680b907f
1 changed files with 26 additions and 0 deletions
26
college-bot.service
Normal file
26
college-bot.service
Normal file
|
@ -0,0 +1,26 @@
|
|||
[Unit]
|
||||
Description=LCC Bot
|
||||
StartLimitBurst=10
|
||||
# If we're still failing after 10 attempts, something is wrong.
|
||||
Wants=network-online.target
|
||||
After=network.target network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
RemainAfterExit=no
|
||||
ExecStart=/home/nex/jimmy/venv/bin/python3 /home/nex/jimmy/main.py
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
# Wait 5 seconds before restarts
|
||||
User=nex
|
||||
MemoryMax=1024M
|
||||
CPUQuota=50%
|
||||
|
||||
# Security so that people like @Mcharlsto can't delete my system "by accident"
|
||||
PrivateTmp=true
|
||||
PrivateDevices=true
|
||||
ProtectSystem=true
|
||||
ProtectHome=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in a new issue