From 3bc4d1c00e6499da664f7d1f43551dd7818e4fc2 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Wed, 25 Jun 2025 11:24:47 +0200 Subject: Add clamav --- rc.clamav/clamd/data/check | 3 +++ rc.clamav/clamd/dependencies | 5 +++++ rc.clamav/clamd/env/CMD | 1 + rc.clamav/clamd/notification-fd | 1 + rc.clamav/clamd/producer-for | 1 + rc.clamav/clamd/run | 13 +++++++++++++ rc.clamav/clamd/type | 1 + 7 files changed, 25 insertions(+) create mode 100755 rc.clamav/clamd/data/check create mode 100644 rc.clamav/clamd/dependencies create mode 100644 rc.clamav/clamd/env/CMD create mode 100644 rc.clamav/clamd/notification-fd create mode 100644 rc.clamav/clamd/producer-for create mode 100644 rc.clamav/clamd/run create mode 100644 rc.clamav/clamd/type (limited to 'rc.clamav/clamd') diff --git a/rc.clamav/clamd/data/check b/rc.clamav/clamd/data/check new file mode 100755 index 0000000..92bb07d --- /dev/null +++ b/rc.clamav/clamd/data/check @@ -0,0 +1,3 @@ +#!/bin/execlineb -P + +test -S /run/clamav/clamd.sock diff --git a/rc.clamav/clamd/dependencies b/rc.clamav/clamd/dependencies new file mode 100644 index 0000000..a262a61 --- /dev/null +++ b/rc.clamav/clamd/dependencies @@ -0,0 +1,5 @@ +tmpfs-run +# Comment out "remount-root" and uncomment "local-fs" +# if you use separate partition for /var +remount-root +#local-fs diff --git a/rc.clamav/clamd/env/CMD b/rc.clamav/clamd/env/CMD new file mode 100644 index 0000000..8d6fb8d --- /dev/null +++ b/rc.clamav/clamd/env/CMD @@ -0,0 +1 @@ +clamd diff --git a/rc.clamav/clamd/notification-fd b/rc.clamav/clamd/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/rc.clamav/clamd/notification-fd @@ -0,0 +1 @@ +3 diff --git a/rc.clamav/clamd/producer-for b/rc.clamav/clamd/producer-for new file mode 100644 index 0000000..cd3b941 --- /dev/null +++ b/rc.clamav/clamd/producer-for @@ -0,0 +1 @@ +clamav-log diff --git a/rc.clamav/clamd/run b/rc.clamav/clamd/run new file mode 100644 index 0000000..14a4538 --- /dev/null +++ b/rc.clamav/clamd/run @@ -0,0 +1,13 @@ +#!/bin/execlineb -P + +###################################### +# Start clamd (an anti-virus daemon) # +###################################### + +fdmove -c 2 1 +foreground { install -o clamav -g clamav -m 0771 -d /run/clamav } +s6-envdir env +importas -u CMD CMD +s6-notifyoncheck -d -w3750 -n16 +s6-setuidgid clamav +exec -c $CMD diff --git a/rc.clamav/clamd/type b/rc.clamav/clamd/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/rc.clamav/clamd/type @@ -0,0 +1 @@ +longrun -- cgit v1.2.3