summaryrefslogtreecommitdiff
path: root/extra/clamav/install
diff options
context:
space:
mode:
Diffstat (limited to 'extra/clamav/install')
-rw-r--r--extra/clamav/install14
1 files changed, 14 insertions, 0 deletions
diff --git a/extra/clamav/install b/extra/clamav/install
new file mode 100644
index 000000000..9116dc394
--- /dev/null
+++ b/extra/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
+
+ install -d /var/{log,run}/clamav
+ chown clamav:root /var/{log,run}/clamav
+ chown -R clamav:clamav /var/lib/clamav
+}
+
+post_remove() {
+ getent passwd clamav &>/dev/null && userdel clamav >/dev/null
+ getent group clamav &>/dev/null && groupdel clamav >/dev/null
+ return 0
+}