summaryrefslogtreecommitdiff
path: root/clamav
diff options
context:
space:
mode:
authorMatt Housh <jaeger@crux.ninja>2015-11-25 16:43:37 -0600
committerMatt Housh <jaeger@crux.ninja>2015-11-25 16:43:37 -0600
commit93813db54a5cea5f2bcbf5154e451614a4976f4d (patch)
treed38cc244356117c14134f09377477607adebbe92 /clamav
parent7e752e6c28beecf3fe0b58a48c7f7254e8dfb9fd (diff)
downloadcontrib-93813db54a5cea5f2bcbf5154e451614a4976f4d.tar.gz
contrib-93813db54a5cea5f2bcbf5154e451614a4976f4d.tar.xz
clamav: fixed pre-install script idempotence
Diffstat (limited to 'clamav')
-rwxr-xr-xclamav/pre-install10
1 files changed, 8 insertions, 2 deletions
diff --git a/clamav/pre-install b/clamav/pre-install
index 227d4e4ec..5071096fc 100755
--- a/clamav/pre-install
+++ b/clamav/pre-install
@@ -1,4 +1,10 @@
#!/bin/sh
-/usr/sbin/groupadd clamav
-/usr/sbin/useradd -g clamav -d /var/empty -s /bin/false clamav
+if [ -z `getent group clamav` ]; then
+ /usr/sbin/groupadd -r clamav
+fi
+
+if [ -z `getent passwd clamav` ]; then
+ /usr/sbin/useradd -r -g clamav -d /etc/clamav -s /bin/false -c "ClamAV" clamav
+ /usr/bin/passwd -l
+fi

Generated by cgit