mirror of
https://codeberg.org/andyscott/s6-scripts.git
synced 2024-12-21 18:03:12 -05:00
Added klogd, smartmontools, tomoyo-tools
This commit is contained in:
parent
bf2b6fe54c
commit
e99b691a85
28 changed files with 76 additions and 0 deletions
2
klogd/README.md
Normal file
2
klogd/README.md
Normal 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)
|
1
klogd/klogd-log/consumer-for
Normal file
1
klogd/klogd-log/consumer-for
Normal file
|
@ -0,0 +1 @@
|
||||||
|
klogd-srv
|
1
klogd/klogd-log/notification-fd
Normal file
1
klogd/klogd-log/notification-fd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
3
|
1
klogd/klogd-log/pipeline-name
Normal file
1
klogd/klogd-log/pipeline-name
Normal file
|
@ -0,0 +1 @@
|
||||||
|
klogd
|
9
klogd/klogd-log/run
Normal file
9
klogd/klogd-log/run
Normal 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
1
klogd/klogd-log/type
Normal file
|
@ -0,0 +1 @@
|
||||||
|
longrun
|
1
klogd/klogd-srv/producer-for
Normal file
1
klogd/klogd-srv/producer-for
Normal file
|
@ -0,0 +1 @@
|
||||||
|
klogd-log
|
5
klogd/klogd-srv/run
Normal file
5
klogd/klogd-srv/run
Normal 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
1
klogd/klogd-srv/type
Normal file
|
@ -0,0 +1 @@
|
||||||
|
longrun
|
2
klogd/klogd.conf
Normal file
2
klogd/klogd.conf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
# This configures the directives used for s6-log in the log service.
|
||||||
|
DIRECTIVES="s2000000 n3 t"
|
1
smartmontools/smartd-log/consumer-for
Normal file
1
smartmontools/smartd-log/consumer-for
Normal file
|
@ -0,0 +1 @@
|
||||||
|
smartd-srv
|
1
smartmontools/smartd-log/notification-fd
Normal file
1
smartmontools/smartd-log/notification-fd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
3
|
1
smartmontools/smartd-log/pipeline-name
Normal file
1
smartmontools/smartd-log/pipeline-name
Normal file
|
@ -0,0 +1 @@
|
||||||
|
smartd
|
9
smartmontools/smartd-log/run
Normal file
9
smartmontools/smartd-log/run
Normal 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
|
1
smartmontools/smartd-log/type
Normal file
1
smartmontools/smartd-log/type
Normal file
|
@ -0,0 +1 @@
|
||||||
|
longrun
|
1
smartmontools/smartd-srv/producer-for
Normal file
1
smartmontools/smartd-srv/producer-for
Normal file
|
@ -0,0 +1 @@
|
||||||
|
smartd-log
|
5
smartmontools/smartd-srv/run
Normal file
5
smartmontools/smartd-srv/run
Normal 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}
|
1
smartmontools/smartd-srv/type
Normal file
1
smartmontools/smartd-srv/type
Normal file
|
@ -0,0 +1 @@
|
||||||
|
longrun
|
5
smartmontools/smartd.conf
Normal file
5
smartmontools/smartd.conf
Normal 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"
|
1
tomoyo-tools/tomoyo-auditd-log/consumer-for
Normal file
1
tomoyo-tools/tomoyo-auditd-log/consumer-for
Normal file
|
@ -0,0 +1 @@
|
||||||
|
tomoyo-auditd-srv
|
1
tomoyo-tools/tomoyo-auditd-log/notification-fd
Normal file
1
tomoyo-tools/tomoyo-auditd-log/notification-fd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
3
|
1
tomoyo-tools/tomoyo-auditd-log/pipeline-name
Normal file
1
tomoyo-tools/tomoyo-auditd-log/pipeline-name
Normal file
|
@ -0,0 +1 @@
|
||||||
|
tomoyo-auditd
|
9
tomoyo-tools/tomoyo-auditd-log/run
Normal file
9
tomoyo-tools/tomoyo-auditd-log/run
Normal 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
|
1
tomoyo-tools/tomoyo-auditd-log/type
Normal file
1
tomoyo-tools/tomoyo-auditd-log/type
Normal file
|
@ -0,0 +1 @@
|
||||||
|
longrun
|
1
tomoyo-tools/tomoyo-auditd-srv/producer-for
Normal file
1
tomoyo-tools/tomoyo-auditd-srv/producer-for
Normal file
|
@ -0,0 +1 @@
|
||||||
|
tomoyo-auditd-log
|
5
tomoyo-tools/tomoyo-auditd-srv/run
Normal file
5
tomoyo-tools/tomoyo-auditd-srv/run
Normal 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}
|
1
tomoyo-tools/tomoyo-auditd-srv/type
Normal file
1
tomoyo-tools/tomoyo-auditd-srv/type
Normal file
|
@ -0,0 +1 @@
|
||||||
|
longrun
|
7
tomoyo-tools/tomoyo-auditd.conf
Normal file
7
tomoyo-tools/tomoyo-auditd.conf
Normal 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"
|
Loading…
Reference in a new issue