1
0
forked from ports/contrib

clamav: fixed pre-install script idempotence

This commit is contained in:
Matt Housh 2015-11-25 16:43:37 -06:00
parent 7e752e6c28
commit 93813db54a

View File

@ -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