diff options
author | Matt Housh <jaeger@crux.ninja> | 2015-11-25 16:43:37 -0600 |
---|---|---|
committer | Matt Housh <jaeger@crux.ninja> | 2015-11-25 16:43:37 -0600 |
commit | 93813db54a5cea5f2bcbf5154e451614a4976f4d (patch) | |
tree | d38cc244356117c14134f09377477607adebbe92 /clamav | |
parent | 7e752e6c28beecf3fe0b58a48c7f7254e8dfb9fd (diff) | |
download | contrib-93813db54a5cea5f2bcbf5154e451614a4976f4d.tar.gz contrib-93813db54a5cea5f2bcbf5154e451614a4976f4d.tar.xz |
clamav: fixed pre-install script idempotence
Diffstat (limited to 'clamav')
-rwxr-xr-x | clamav/pre-install | 10 |
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 |