diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2003-01-20 03:41:52 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2003-01-20 03:41:52 +0000 |
commit | ee4e1d457587d32fc4cbe38305e1f8033abcaaf9 (patch) | |
tree | 6e165ba11990cb7901b6baa129419f4afc017b12 /security/clamav/pkg-install | |
parent | use REINPLACE_CMD (diff) |
new port: security/clamav
Clam Antivirus is command line virus scanner using database
from OpenAntiVirus.
PR: ports/40602
Submitted by: TERAMOTO Masahiro <markun@onohara.to>
Diffstat (limited to 'security/clamav/pkg-install')
-rw-r--r-- | security/clamav/pkg-install | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/security/clamav/pkg-install b/security/clamav/pkg-install new file mode 100644 index 000000000000..448ffdc1f34a --- /dev/null +++ b/security/clamav/pkg-install @@ -0,0 +1,30 @@ +#!/bin/sh + +if [ "$2" != "PRE-INSTALL" ]; then + exit 0 +fi + +USER=clamav +GROUP=clamav + +if ! pw groupshow "$GROUP" 2>/dev/null 1>&2; then + if pw groupadd $GROUP; then + echo "=> Added group \"$GROUP\"." + else + echo "=> Adding group \"$GROUP\" failed..." + exit 1 + fi +fi + +if ! pw usershow "$USER" 2>/dev/null 1>&2; then + if pw useradd $USER -g $GROUP -h - \ + -s "/sbin/nologin" -d "/nonexistent" \ + -c "Clam Antivirus"; \ + then + echo "=> Added user \"$USER\"." + else + echo "=> Adding user \"$USER\" failed..." + exit 1 + fi +fi +exit 0 |