diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2003-09-28 13:29:28 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2003-09-28 13:29:28 +0000 |
commit | 5e2bc95fa1f0bd453129c777beb94396393dda0a (patch) | |
tree | cf7e544c9bcad15e703bcdc275554076c4fc2d69 /security/clamav/pkg-install | |
parent | Update port: security/pf - OpenBSD 3.4 pf (diff) |
- don't remove clamav account on deinstall
- use included libtool (seems heavily patched)
- make packageable and include a working configure file
- add a rcNG start/stop script
- added web site
- don't install useless .la files
- use DATADIR
- 510001 is FreeBSD 5.10, 5.1-CURRENT is 501100
- minor cleanup
PR: 57256
Submitted by: eikemeier@fillmore-labs.com
Diffstat (limited to 'security/clamav/pkg-install')
-rw-r--r-- | security/clamav/pkg-install | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/security/clamav/pkg-install b/security/clamav/pkg-install index e99d15038e69..151d27b42fd9 100644 --- a/security/clamav/pkg-install +++ b/security/clamav/pkg-install @@ -1,10 +1,15 @@ #!/bin/sh -if [ "$2" = "PRE-INSTALL" ]; then +PREFIX=${PKG_PREFIX:-%%PREFIX%%} USER=clamav GROUP=clamav +CLAMRUN=/var/run/clamav +CLAMLOG=/var/log/clamav + +if [ "$2" = "PRE-INSTALL" ]; then + if ! pw groupshow "$GROUP" 2>/dev/null 1>&2; then if pw groupadd $GROUP; then echo "=> Added group \"$GROUP\"." @@ -19,20 +24,20 @@ if ! pw usershow "$USER" 2>/dev/null 1>&2; then -s "/sbin/nologin" -d "/nonexistent" \ -c "Clam Antivirus"; \ then + pw groupmod mail -m $USER echo "=> Added user \"$USER\"." else echo "=> Adding user \"$USER\" failed..." exit 1 fi fi -fi -if [ "$2" = "POST-INSTALL" ]; then - chown -R clamav:clamav ${PKG_PREFIX}/share/clamav -fi +mkdir -p "$CLAMRUN" +chown "$USER:$GROUP" "$CLAMRUN" -if [ "$2" != "POST-INSTALL" ] && [ "$2" != "PRE-INSTALL" ]; then - exit 0 -fi +mkdir -p "$CLAMLOG" +chown "$USER:$GROUP" "$CLAMLOG" + +fi # PRE-INSTALL exit 0 |