mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-12-01 15:59:22 +01:00
30 lines
1.0 KiB
Desktop File
30 lines
1.0 KiB
Desktop File
[Unit]
|
|
Description=Limnoria instance
|
|
After=network-online.target
|
|
# if sharing server with IRC server, add
|
|
#ergo.service
|
|
#Wants=ergo.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
Environment=PATH=/home/BOTUSER/venv/bin:/home/BOTUSER/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
|
|
Environment="TZ=Europe/Helsinki"
|
|
# if supybot.commands.allowShell is True and this is not set, may default to /
|
|
WorkingDirectory=/home/BOTUSER/
|
|
# supybot.pidFile
|
|
PIDFile=/home/BOTUSER/BOTNICKNAME/BOTNICKNAME.pid
|
|
# mkdir venv && python3 -m venv venv && . venv/bin/activate && python3 -m pip install git+https://github.com/ProgVal/Limnoria.git@testing
|
|
ExecStart=/home/BOTUSER/venv/bin/limnoria /home/BOTUSER/BOTNICKNAME/BOTNICKNAME.conf
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
Restart=always
|
|
RestartSec=5s
|
|
User=BOTUSER
|
|
# Limit memory to 300 Mb after which throthhle use. Useful with pypy.
|
|
# https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html
|
|
MemoryHigh=300M
|
|
# Also attempt to restrict CPU use to 9 %
|
|
#CPUQuota=9%
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|