diff --git a/klogd/README.md b/klogd/README.md new file mode 100644 index 0000000..0c70fc5 --- /dev/null +++ b/klogd/README.md @@ -0,0 +1,2 @@ +Based on the [example](https://git.skarnet.org/cgi-bin/cgit.cgi/s6/tree/examples/klogd-linux) provided by s6, +Copyright (c) 2011 Laurent Bercot [ISC License](https://git.skarnet.org/cgi-bin/cgit.cgi/s6/tree/COPYING) diff --git a/klogd/klogd-log/consumer-for b/klogd/klogd-log/consumer-for new file mode 100644 index 0000000..3a77aac --- /dev/null +++ b/klogd/klogd-log/consumer-for @@ -0,0 +1 @@ +klogd-srv diff --git a/klogd/klogd-log/notification-fd b/klogd/klogd-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/klogd/klogd-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/klogd/klogd-log/pipeline-name b/klogd/klogd-log/pipeline-name new file mode 100644 index 0000000..fd64770 --- /dev/null +++ b/klogd/klogd-log/pipeline-name @@ -0,0 +1 @@ +klogd diff --git a/klogd/klogd-log/run b/klogd/klogd-log/run new file mode 100644 index 0000000..17e8f2e --- /dev/null +++ b/klogd/klogd-log/run @@ -0,0 +1,9 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/klogd.conf +importas -sCuD "s2000000 n3 t" DIRECTIVES DIRECTIVES +ifelse { test -w /var/log } { + foreground { install -d -o root -g root /var/log/klogd } + exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/klogd +} +foreground { install -d -o root -g root /run/log/klogd } +exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/klogd diff --git a/klogd/klogd-log/type b/klogd/klogd-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/klogd/klogd-log/type @@ -0,0 +1 @@ +longrun diff --git a/klogd/klogd-srv/producer-for b/klogd/klogd-srv/producer-for new file mode 100644 index 0000000..2f21a8f --- /dev/null +++ b/klogd/klogd-srv/producer-for @@ -0,0 +1 @@ +klogd-log diff --git a/klogd/klogd-srv/run b/klogd/klogd-srv/run new file mode 100644 index 0000000..ae9935a --- /dev/null +++ b/klogd/klogd-srv/run @@ -0,0 +1,5 @@ +#!/bin/execlineb -P +fdmove -c 2 1 +redirfd -r 0 /proc/kmsg +exec -c +ucspilogd diff --git a/klogd/klogd-srv/type b/klogd/klogd-srv/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/klogd/klogd-srv/type @@ -0,0 +1 @@ +longrun diff --git a/klogd/klogd.conf b/klogd/klogd.conf new file mode 100644 index 0000000..f4d51a6 --- /dev/null +++ b/klogd/klogd.conf @@ -0,0 +1,2 @@ +# This configures the directives used for s6-log in the log service. +DIRECTIVES="s2000000 n3 t" diff --git a/smartmontools/smartd-log/consumer-for b/smartmontools/smartd-log/consumer-for new file mode 100644 index 0000000..748e470 --- /dev/null +++ b/smartmontools/smartd-log/consumer-for @@ -0,0 +1 @@ +smartd-srv diff --git a/smartmontools/smartd-log/notification-fd b/smartmontools/smartd-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/smartmontools/smartd-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/smartmontools/smartd-log/pipeline-name b/smartmontools/smartd-log/pipeline-name new file mode 100644 index 0000000..fe386f5 --- /dev/null +++ b/smartmontools/smartd-log/pipeline-name @@ -0,0 +1 @@ +smartd diff --git a/smartmontools/smartd-log/run b/smartmontools/smartd-log/run new file mode 100644 index 0000000..b808fbc --- /dev/null +++ b/smartmontools/smartd-log/run @@ -0,0 +1,9 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/smartd.conf +importas -sCuD "s2000000 n3 T" DIRECTIVES DIRECTIVES +ifelse { test -w /var/log } { + foreground { install -d -o s6log -g s6log /var/log/smartd } + s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/smartd +} +foreground { install -d -o s6log -g s6log /run/log/smartd } +s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/smartd diff --git a/smartmontools/smartd-log/type b/smartmontools/smartd-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/smartmontools/smartd-log/type @@ -0,0 +1 @@ +longrun diff --git a/smartmontools/smartd-srv/producer-for b/smartmontools/smartd-srv/producer-for new file mode 100644 index 0000000..3440869 --- /dev/null +++ b/smartmontools/smartd-srv/producer-for @@ -0,0 +1 @@ +smartd-log diff --git a/smartmontools/smartd-srv/run b/smartmontools/smartd-srv/run new file mode 100644 index 0000000..87b3ae9 --- /dev/null +++ b/smartmontools/smartd-srv/run @@ -0,0 +1,5 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/smartd.conf +importas -uD "" SMARTD_OPTS SMARTD_OPTS +fdmove -c 2 1 +exec smartd -d ${SMARTD_OPTS} diff --git a/smartmontools/smartd-srv/type b/smartmontools/smartd-srv/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/smartmontools/smartd-srv/type @@ -0,0 +1 @@ +longrun diff --git a/smartmontools/smartd.conf b/smartmontools/smartd.conf new file mode 100644 index 0000000..a1f00d9 --- /dev/null +++ b/smartmontools/smartd.conf @@ -0,0 +1,5 @@ +# Additional configuration options, see SMARTD(8) +SMARTD_OPTS="" + +# This configures the directives used for s6-log in the log service. +DIRECTIVES="n3 s2000000 T" diff --git a/tomoyo-tools/tomoyo-auditd-log/consumer-for b/tomoyo-tools/tomoyo-auditd-log/consumer-for new file mode 100644 index 0000000..1eb4b9b --- /dev/null +++ b/tomoyo-tools/tomoyo-auditd-log/consumer-for @@ -0,0 +1 @@ +tomoyo-auditd-srv diff --git a/tomoyo-tools/tomoyo-auditd-log/notification-fd b/tomoyo-tools/tomoyo-auditd-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/tomoyo-tools/tomoyo-auditd-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/tomoyo-tools/tomoyo-auditd-log/pipeline-name b/tomoyo-tools/tomoyo-auditd-log/pipeline-name new file mode 100644 index 0000000..f3154aa --- /dev/null +++ b/tomoyo-tools/tomoyo-auditd-log/pipeline-name @@ -0,0 +1 @@ +tomoyo-auditd diff --git a/tomoyo-tools/tomoyo-auditd-log/run b/tomoyo-tools/tomoyo-auditd-log/run new file mode 100644 index 0000000..697488d --- /dev/null +++ b/tomoyo-tools/tomoyo-auditd-log/run @@ -0,0 +1,9 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/tomoyo-auditd.conf +importas -sCuD "n3 s2000000 T" DIRECTIVES DIRECTIVES +ifelse { test -w /var/log } { + foreground { install -d -o s6log -g s6log /var/log/tomoyo-auditd } + s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/tomoyo-auditd +} +foreground { install -d -o s6log -g s6log /run/log/tomoyo-auditd } +s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /run/log/tomoyo-auditd diff --git a/tomoyo-tools/tomoyo-auditd-log/type b/tomoyo-tools/tomoyo-auditd-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/tomoyo-tools/tomoyo-auditd-log/type @@ -0,0 +1 @@ +longrun diff --git a/tomoyo-tools/tomoyo-auditd-srv/producer-for b/tomoyo-tools/tomoyo-auditd-srv/producer-for new file mode 100644 index 0000000..9194e28 --- /dev/null +++ b/tomoyo-tools/tomoyo-auditd-srv/producer-for @@ -0,0 +1 @@ +tomoyo-auditd-log diff --git a/tomoyo-tools/tomoyo-auditd-srv/run b/tomoyo-tools/tomoyo-auditd-srv/run new file mode 100644 index 0000000..a8ea5b6 --- /dev/null +++ b/tomoyo-tools/tomoyo-auditd-srv/run @@ -0,0 +1,5 @@ +#!/bin/execlineb -P +envfile /etc/s6/config/tomoyo-auditd.conf +importas -uD "" REMOTE REMOTE +fdmove -c 2 1 +exec tomoyo-auditd ${REMOTE} diff --git a/tomoyo-tools/tomoyo-auditd-srv/type b/tomoyo-tools/tomoyo-auditd-srv/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/tomoyo-tools/tomoyo-auditd-srv/type @@ -0,0 +1 @@ +longrun diff --git a/tomoyo-tools/tomoyo-auditd.conf b/tomoyo-tools/tomoyo-auditd.conf new file mode 100644 index 0000000..b99be80 --- /dev/null +++ b/tomoyo-tools/tomoyo-auditd.conf @@ -0,0 +1,7 @@ +# Retrieve logs from a remote system (e.g. REMOTE="remote_ip:remote_port") +# Additonal options must still be configured in /etc/tomoyo/tools/auditd.conf +# See TOMOYO-AUDITD(8) +REMOTE="" + +# This configures the directives used for s6-log in the log service. +DIRECTIVES="n3 s2000000 T"