From e5419c2df72ecc6481f475479c1740760287166f Mon Sep 17 00:00:00 2001 From: SneedBot Date: Thu, 27 Jul 2023 23:39:21 +0000 Subject: [PATCH] sneed --- services/opera-proxy.service | 14 ++++++++++++++ services/rdrama-chat.service | 22 ++++++++++++++++++++++ services/rdrama-marseyworld.service | 22 ++++++++++++++++++++++ services/rdrama.service | 22 ++++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 services/opera-proxy.service create mode 100644 services/rdrama-chat.service create mode 100644 services/rdrama-marseyworld.service create mode 100644 services/rdrama.service diff --git a/services/opera-proxy.service b/services/opera-proxy.service new file mode 100644 index 000000000..ead315595 --- /dev/null +++ b/services/opera-proxy.service @@ -0,0 +1,14 @@ +[Unit] +Description = Opera Proxy +After = network-online.target + +[Service] +Restart = on-failure +RestartSec = 30s +User = rdrama +Group = rdrama +ExecStart = /snap/bin/opera-proxy + +[Install] +WantedBy = multi-user.target + diff --git a/services/rdrama-chat.service b/services/rdrama-chat.service new file mode 100644 index 000000000..f63bdf051 --- /dev/null +++ b/services/rdrama-chat.service @@ -0,0 +1,22 @@ +[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 diff --git a/services/rdrama-marseyworld.service b/services/rdrama-marseyworld.service new file mode 100644 index 000000000..0514add85 --- /dev/null +++ b/services/rdrama-marseyworld.service @@ -0,0 +1,22 @@ +[Unit] +Description = rDrama marsey.world +After = network-online.target + +[Service] +Restart = on-failure +RestartSec = 5s +PermissionsStartOnly = true +PIDFile = /run/rdrama-marseyworld/rdrama-marseyworld.pid +User = rdrama +Group = rdrama +WorkingDirectory = /d +ExecStartPre = /bin/mkdir /run/rdrama-marseyworld +ExecStartPre = /bin/chown -R rdrama:rdrama /run/rdrama-marseyworld +ExecStart = /bin/bash -c 'set -a && source /e && SITE=marsey.world /usr/bin/env gunicorn files.__main__:app -k gevent -w 1 --reload -b 0.0.0.0:5010 --max-requests 30000 --max-requests-jitter 30000 --pid /run/rdrama-marseyworld/rdrama-marseyworld.pid' +ExecReload = /bin/kill -s HUP $MAINPID +ExecStop = /bin/kill -s TERM $MAINPID +ExecStopPost = /bin/rm -rf /run/rdrama-marseyworld +PrivateTmp = true + +[Install] +WantedBy = multi-user.target diff --git a/services/rdrama.service b/services/rdrama.service new file mode 100644 index 000000000..672f1965d --- /dev/null +++ b/services/rdrama.service @@ -0,0 +1,22 @@ +[Unit] +Description = rDrama +After = network-online.target + +[Service] +Restart = on-failure +RestartSec = 10s +PermissionsStartOnly = true +PIDFile = /run/rdrama/rdrama.pid +User = rdrama +Group = rdrama +WorkingDirectory = /d +ExecStartPre = /bin/mkdir /run/rdrama +ExecStartPre = /bin/chown -R rdrama:rdrama /run/rdrama +ExecStart = /bin/bash -c 'set -a && source /e && /usr/bin/env gunicorn files.__main__:app -w 16 --pid /run/rdrama/rdrama.pid' +ExecReload = /bin/kill -s HUP $MAINPID +ExecStop = /bin/kill -s TERM $MAINPID +ExecStopPost = /bin/rm -rf /run/rdrama +PrivateTmp = true + +[Install] +WantedBy = multi-user.target