mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
e25644564f
Update to snapshot(20030625). PR: ports/53306 Submitted by: Rob Evers <rob@debank.tv> Approved by: portmgr (marcus) Repo copyed by: cvs (joe)
32 lines
721 B
Bash
32 lines
721 B
Bash
#!/bin/sh
|
|
|
|
|
|
if [ "$2" != "PRE-INSTALL" ]; then
|
|
chown -R clamav:clamav ${PKG_PREFIX}/share/clamav
|
|
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
|