mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-21 19:39:43 +01:00
add s6 services to distrib
This commit is contained in:
parent
9b6ec04ca5
commit
9f7ead07a5
8
distrib/s6/README
Normal file
8
distrib/s6/README
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
This directory contains s6 srv and log services for ergo.
|
||||||
|
|
||||||
|
These services expect that ergo is installed to /opt/ergo,
|
||||||
|
and an ergo system user that owns /opt/ergo.
|
||||||
|
|
||||||
|
To install:
|
||||||
|
cp -r ergo-srv ergo-log /etc/s6/sv/
|
||||||
|
cp ergo.conf /etc/s6/config/
|
1
distrib/s6/ergo-log/consumer-for
Normal file
1
distrib/s6/ergo-log/consumer-for
Normal file
@ -0,0 +1 @@
|
|||||||
|
ergo-srv
|
1
distrib/s6/ergo-log/notification-fd
Normal file
1
distrib/s6/ergo-log/notification-fd
Normal file
@ -0,0 +1 @@
|
|||||||
|
3
|
1
distrib/s6/ergo-log/pipeline-name
Normal file
1
distrib/s6/ergo-log/pipeline-name
Normal file
@ -0,0 +1 @@
|
|||||||
|
ergo
|
9
distrib/s6/ergo-log/run
Normal file
9
distrib/s6/ergo-log/run
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/execlineb -P
|
||||||
|
envfile /etc/s6/config/ergo.conf
|
||||||
|
importas -sCiu DIRECTIVES DIRECTIVES
|
||||||
|
ifelse { test -w /var/log } {
|
||||||
|
foreground { install -d -o s6log -g s6log /var/log/ergo }
|
||||||
|
s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/ergo
|
||||||
|
}
|
||||||
|
foreground { install -d -o s6log -g s6log /run/log/ergo }
|
||||||
|
s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/ergo
|
1
distrib/s6/ergo-log/type
Normal file
1
distrib/s6/ergo-log/type
Normal file
@ -0,0 +1 @@
|
|||||||
|
longrun
|
1
distrib/s6/ergo-srv/producer-for
Normal file
1
distrib/s6/ergo-srv/producer-for
Normal file
@ -0,0 +1 @@
|
|||||||
|
ergo-log
|
4
distrib/s6/ergo-srv/run
Normal file
4
distrib/s6/ergo-srv/run
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/execlineb -P
|
||||||
|
fdmove -c 2 1
|
||||||
|
execline-cd /opt/ergo
|
||||||
|
s6-setuidgid ergo ./ergo run
|
1
distrib/s6/ergo-srv/type
Normal file
1
distrib/s6/ergo-srv/type
Normal file
@ -0,0 +1 @@
|
|||||||
|
longrun
|
2
distrib/s6/ergo.conf
Normal file
2
distrib/s6/ergo.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# This configures the directives used for s6-log in the log service.
|
||||||
|
DIRECTIVES="n3 s2000000"
|
Loading…
Reference in New Issue
Block a user