Added klogd, smartmontools, tomoyo-tools

This commit is contained in:
Andrew Scott 2023-04-14 22:49:33 -04:00
parent bf2b6fe54c
commit e99b691a85
Signed by: a
GPG key ID: 7CD5A5977E4931C1
28 changed files with 76 additions and 0 deletions

2
klogd/README.md Normal file
View file

@ -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)

View file

@ -0,0 +1 @@
klogd-srv

View file

@ -0,0 +1 @@
3

View file

@ -0,0 +1 @@
klogd

9
klogd/klogd-log/run Normal file
View file

@ -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

1
klogd/klogd-log/type Normal file
View file

@ -0,0 +1 @@
longrun

View file

@ -0,0 +1 @@
klogd-log

5
klogd/klogd-srv/run Normal file
View file

@ -0,0 +1,5 @@
#!/bin/execlineb -P
fdmove -c 2 1
redirfd -r 0 /proc/kmsg
exec -c
ucspilogd

1
klogd/klogd-srv/type Normal file
View file

@ -0,0 +1 @@
longrun

2
klogd/klogd.conf Normal file
View file

@ -0,0 +1,2 @@
# This configures the directives used for s6-log in the log service.
DIRECTIVES="s2000000 n3 t"

View file

@ -0,0 +1 @@
smartd-srv

View file

@ -0,0 +1 @@
3

View file

@ -0,0 +1 @@
smartd

View file

@ -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

View file

@ -0,0 +1 @@
longrun

View file

@ -0,0 +1 @@
smartd-log

View file

@ -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}

View file

@ -0,0 +1 @@
longrun

View file

@ -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"

View file

@ -0,0 +1 @@
tomoyo-auditd-srv

View file

@ -0,0 +1 @@
3

View file

@ -0,0 +1 @@
tomoyo-auditd

View file

@ -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

View file

@ -0,0 +1 @@
longrun

View file

@ -0,0 +1 @@
tomoyo-auditd-log

View file

@ -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}

View file

@ -0,0 +1 @@
longrun

View file

@ -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"