MarseyWorld/services/rdrama-chat.service

23 lines
784 B
INI

[Unit]
Description = rDrama Chat
After = network-online.target
[Service]
Restart = on-failure
RestartSec = 10s
PermissionsStartOnly = true
PIDFile = /run/rdrama-chat/rdrama-chat.pid
User = rdrama
Group = rdrama
WorkingDirectory = /d
ExecStartPre = /bin/mkdir /run/rdrama-chat
ExecStartPre = /bin/chown -R rdrama:rdrama /run/rdrama-chat
ExecStart = /bin/bash -c 'set -a && source /e && /usr/bin/env gunicorn files.__main__:app load_chat -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 -b 0.0.0.0:5001 --max-requests 30000 --max-requests-jitter 30000 --pid /run/rdrama-chat/rdrama-chat.pid'
ExecReload = /bin/kill -s HUP $MAINPID
ExecStop = /bin/kill -s TERM $MAINPID
ExecStopPost = /bin/rm -rf /run/rdrama-chat
PrivateTmp = true
[Install]
WantedBy = multi-user.target