diff options
| author | Eugen Wissner <belka@caraus.de> | 2025-06-25 11:24:47 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2025-06-25 11:25:35 +0200 |
| commit | 3bc4d1c00e6499da664f7d1f43551dd7818e4fc2 (patch) | |
| tree | 4e69ecd463332a628d1e1f703c44be9d39092141 /rc.clamav/clamav-log | |
| parent | a32eb01f97e3ee98b5c049270f9eca97c407dd0b (diff) | |
| download | s6-3bc4d1c00e6499da664f7d1f43551dd7818e4fc2.tar.gz | |
Add clamav
Diffstat (limited to 'rc.clamav/clamav-log')
| -rw-r--r-- | rc.clamav/clamav-log/consumer-for | 2 | ||||
| -rw-r--r-- | rc.clamav/clamav-log/dependencies | 4 | ||||
| -rw-r--r-- | rc.clamav/clamav-log/env/CMD | 1 | ||||
| -rw-r--r-- | rc.clamav/clamav-log/env/CMD_OPTS | 1 | ||||
| -rw-r--r-- | rc.clamav/clamav-log/env/LOGDIR_GROUP | 2 | ||||
| -rw-r--r-- | rc.clamav/clamav-log/env/LOGDIR_OWNER | 2 | ||||
| -rw-r--r-- | rc.clamav/clamav-log/env/LOGDIR_PATH | 2 | ||||
| -rw-r--r-- | rc.clamav/clamav-log/env/LOGDIR_PERMS | 2 | ||||
| -rw-r--r-- | rc.clamav/clamav-log/env/LOG_SCRIPT | 2 | ||||
| -rw-r--r-- | rc.clamav/clamav-log/notification-fd | 1 | ||||
| -rw-r--r-- | rc.clamav/clamav-log/run | 24 | ||||
| -rw-r--r-- | rc.clamav/clamav-log/type | 1 |
12 files changed, 44 insertions, 0 deletions
diff --git a/rc.clamav/clamav-log/consumer-for b/rc.clamav/clamav-log/consumer-for new file mode 100644 index 0000000..20601cd --- /dev/null +++ b/rc.clamav/clamav-log/consumer-for @@ -0,0 +1,2 @@ +clamd +freshclam diff --git a/rc.clamav/clamav-log/dependencies b/rc.clamav/clamav-log/dependencies new file mode 100644 index 0000000..e85efae --- /dev/null +++ b/rc.clamav/clamav-log/dependencies @@ -0,0 +1,4 @@ +# Comment out "remount-root" and uncomment "local-fs" +# if you use separate partition for /var/log +remount-root +#local-fs diff --git a/rc.clamav/clamav-log/env/CMD b/rc.clamav/clamav-log/env/CMD new file mode 100644 index 0000000..9d5239c --- /dev/null +++ b/rc.clamav/clamav-log/env/CMD @@ -0,0 +1 @@ +s6-log diff --git a/rc.clamav/clamav-log/env/CMD_OPTS b/rc.clamav/clamav-log/env/CMD_OPTS new file mode 100644 index 0000000..00d672e --- /dev/null +++ b/rc.clamav/clamav-log/env/CMD_OPTS @@ -0,0 +1 @@ +-d3 diff --git a/rc.clamav/clamav-log/env/LOGDIR_GROUP b/rc.clamav/clamav-log/env/LOGDIR_GROUP new file mode 100644 index 0000000..3794bcd --- /dev/null +++ b/rc.clamav/clamav-log/env/LOGDIR_GROUP @@ -0,0 +1,2 @@ +root +# Logging directory group ownership diff --git a/rc.clamav/clamav-log/env/LOGDIR_OWNER b/rc.clamav/clamav-log/env/LOGDIR_OWNER new file mode 100644 index 0000000..9f9fd12 --- /dev/null +++ b/rc.clamav/clamav-log/env/LOGDIR_OWNER @@ -0,0 +1,2 @@ +root +# Logging directory owner diff --git a/rc.clamav/clamav-log/env/LOGDIR_PATH b/rc.clamav/clamav-log/env/LOGDIR_PATH new file mode 100644 index 0000000..3c4ffad --- /dev/null +++ b/rc.clamav/clamav-log/env/LOGDIR_PATH @@ -0,0 +1,2 @@ +/var/log/clamav +# Logging directory path diff --git a/rc.clamav/clamav-log/env/LOGDIR_PERMS b/rc.clamav/clamav-log/env/LOGDIR_PERMS new file mode 100644 index 0000000..ccece6e --- /dev/null +++ b/rc.clamav/clamav-log/env/LOGDIR_PERMS @@ -0,0 +1,2 @@ +750 +# Logging directory access rights in octal diff --git a/rc.clamav/clamav-log/env/LOG_SCRIPT b/rc.clamav/clamav-log/env/LOG_SCRIPT new file mode 100644 index 0000000..948a563 --- /dev/null +++ b/rc.clamav/clamav-log/env/LOG_SCRIPT @@ -0,0 +1,2 @@ +n4 s500000 T $LOGDIR_PATH +# Logging script used by s6-log diff --git a/rc.clamav/clamav-log/notification-fd b/rc.clamav/clamav-log/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/rc.clamav/clamav-log/notification-fd @@ -0,0 +1 @@ +3 diff --git a/rc.clamav/clamav-log/run b/rc.clamav/clamav-log/run new file mode 100644 index 0000000..7bcc996 --- /dev/null +++ b/rc.clamav/clamav-log/run @@ -0,0 +1,24 @@ +#!/bin/execlineb -P + +################################################ +# Start a logging daemon for the clamav daemon # +################################################ + +s6-envdir env +multisubstitute { + importas -u LOGDIR_OWNER LOGDIR_OWNER + importas -u LOGDIR_GROUP LOGDIR_GROUP + importas -u LOGDIR_PERMS LOGDIR_PERMS + importas -u CMD CMD + importas -usCd" " CMD_OPTS CMD_OPTS + importas -usCd" " LOG_SCRIPT LOG_SCRIPT +} +s6-envuidgid -B ${LOGDIR_OWNER}:${LOGDIR_GROUP} +multisubstitute { + importas -u LOGDIR_PATH LOGDIR_PATH + importas -u UID UID + importas -u GID GID +} +if { install -dm $LOGDIR_PERMS -o $UID -g $GID $LOGDIR_PATH } +s6-setuidgid ${UID}:${GID} +exec -c $CMD $CMD_OPTS -- $LOG_SCRIPT diff --git a/rc.clamav/clamav-log/type b/rc.clamav/clamav-log/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rc.clamav/clamav-log/type @@ -0,0 +1 @@ +longrun |
