summaryrefslogtreecommitdiff
path: root/testing/clamav/install
diff options
context:
space:
mode:
Diffstat (limited to 'testing/clamav/install')
-rw-r--r--testing/clamav/install14
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/clamav/install b/testing/clamav/install
new file mode 100644
index 000000000..a2092e815
--- /dev/null
+++ b/testing/clamav/install
@@ -0,0 +1,14 @@
+post_install() {
+ getent group clamav &>/dev/null || groupadd -r -g 64 clamav >/dev/null
+ getent passwd clamav &>/dev/null || useradd -r -u 64 -g clamav -d /dev/null -s /bin/false -c "Clam AntiVirus" clamav >/dev/null
+
+ chown -R clamav:clamav /var/lib/clamav
+ install -o clamav -g clamav -d /run/clamav
+ install -o clamav -g clamav -d /var/log/clamav
+}
+
+post_remove() {
+ getent passwd clamav &>/dev/null && userdel clamav >/dev/null
+ getent group clamav &>/dev/null && groupdel clamav >/dev/null
+ return 0
+}