Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add s6 services to distrib #1786

Merged
merged 1 commit into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions distrib/s6/README
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions distrib/s6/ergo-log/consumer-for
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ergo-srv
1 change: 1 addition & 0 deletions distrib/s6/ergo-log/notification-fd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
1 change: 1 addition & 0 deletions distrib/s6/ergo-log/pipeline-name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ergo
9 changes: 9 additions & 0 deletions distrib/s6/ergo-log/run
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions distrib/s6/ergo-log/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
1 change: 1 addition & 0 deletions distrib/s6/ergo-srv/producer-for
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ergo-log
4 changes: 4 additions & 0 deletions distrib/s6/ergo-srv/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/execlineb -P
fdmove -c 2 1
execline-cd /opt/ergo
s6-setuidgid ergo ./ergo run
1 change: 1 addition & 0 deletions distrib/s6/ergo-srv/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
2 changes: 2 additions & 0 deletions distrib/s6/ergo.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This configures the directives used for s6-log in the log service.
DIRECTIVES="n3 s2000000"