server-config/systemd_units/walls-bot.service
Harsh Shandilya 9a506ec776
systemd: Cap resource usage for all services
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
2019-09-10 20:59:04 +05:30

24 lines
430 B
Desktop File

[Unit]
Description=Desktop walls bot service
After=network.target
[Service]
Restart=on-abort
Type=simple
User=bot
WorkingDirectory=/home/bot/walls-bot
ExecStart=/home/bot/walls-bot/gradlew run
ExecReload=/bin/kill -USR1 $MAINPID
KillMode=mixed
KillSignal=SIGQUIT
TimeoutStopSec=5s
PrivateTmp=true
PrivateDevices=false
ProtectSystem=full
CPUWeight=10
CPUQuota=10%
IOWeight=20
MemorySwapMax=0
[Install]
WantedBy=multi-user.target