From 9bb6b9f7d5246c7a896c909c40370dc75644d4cf Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Tue, 10 Jan 2023 21:53:00 +0530 Subject: uwsgi: add s6-rc service scripts for uwsgi, cgit --- uwsgi/uwsgi-log/consumer-for | 1 + uwsgi/uwsgi-log/notification-fd | 1 + uwsgi/uwsgi-log/pipeline-name | 1 + uwsgi/uwsgi-log/run | 9 +++++++++ uwsgi/uwsgi-log/type | 1 + uwsgi/uwsgi-srv/producer-for | 1 + uwsgi/uwsgi-srv/run | 5 +++++ uwsgi/uwsgi-srv/type | 1 + uwsgi/uwsgi.conf | 5 +++++ 9 files changed, 25 insertions(+) create mode 100644 uwsgi/uwsgi-log/consumer-for create mode 100644 uwsgi/uwsgi-log/notification-fd create mode 100644 uwsgi/uwsgi-log/pipeline-name create mode 100644 uwsgi/uwsgi-log/run create mode 100644 uwsgi/uwsgi-log/type create mode 100644 uwsgi/uwsgi-srv/producer-for create mode 100644 uwsgi/uwsgi-srv/run create mode 100644 uwsgi/uwsgi-srv/type create mode 100644 uwsgi/uwsgi.conf diff --git a/uwsgi/uwsgi-log/consumer-for b/uwsgi/uwsgi-log/consumer-for new file mode 100644 index 0000000..ad70c24 --- /dev/null +++ b/uwsgi/uwsgi-log/consumer-for @@ -0,0 +1 @@ +uwsgi-srv diff --git a/uwsgi/uwsgi-log/notification-fd b/uwsgi/uwsgi-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/uwsgi/uwsgi-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/uwsgi/uwsgi-log/pipeline-name b/uwsgi/uwsgi-log/pipeline-name new file mode 100644 index 0000000..caf986e --- /dev/null +++ b/uwsgi/uwsgi-log/pipeline-name @@ -0,0 +1 @@ +uwsgi diff --git a/uwsgi/uwsgi-log/run b/uwsgi/uwsgi-log/run new file mode 100644 index 0000000..88a37b0 --- /dev/null +++ b/uwsgi/uwsgi-log/run @@ -0,0 +1,9 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/uwsgi.conf +importas -sCuD "n3 s2000000 T" DIRECTIVES DIRECTIVES +ifelse { test -w /var/log } { + foreground { install -d -o s6log -g s6log /var/log/uwsgi } + s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/uwsgi +} +foreground { install -d -o s6log -g s6log /run/log/uwsgi } +s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/uwsgi diff --git a/uwsgi/uwsgi-log/type b/uwsgi/uwsgi-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/uwsgi/uwsgi-log/type @@ -0,0 +1 @@ +longrun diff --git a/uwsgi/uwsgi-srv/producer-for b/uwsgi/uwsgi-srv/producer-for new file mode 100644 index 0000000..8216f45 --- /dev/null +++ b/uwsgi/uwsgi-srv/producer-for @@ -0,0 +1 @@ +uwsgi-log diff --git a/uwsgi/uwsgi-srv/run b/uwsgi/uwsgi-srv/run new file mode 100644 index 0000000..bc7902e --- /dev/null +++ b/uwsgi/uwsgi-srv/run @@ -0,0 +1,5 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/uwsgi.conf +importas -sCuD "" OPTS OPTS +fdmove -c 2 1 +exec /usr/bin/uwsgi ${OPTS} diff --git a/uwsgi/uwsgi-srv/type b/uwsgi/uwsgi-srv/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/uwsgi/uwsgi-srv/type @@ -0,0 +1 @@ +longrun diff --git a/uwsgi/uwsgi.conf b/uwsgi/uwsgi.conf new file mode 100644 index 0000000..82aafc3 --- /dev/null +++ b/uwsgi/uwsgi.conf @@ -0,0 +1,5 @@ +# Optional arguments for dendrite +OPTS="--ini /etc/uwsgi/cgit.ini" + +# This configures the directives used for s6-log in the log service. +DIRECTIVES="n3 s2000000 T" -- cgit v1.2.3