diff options
author | Alexander Botero-Lowry <alexbl@FreeBSD.org> | 2006-11-16 08:56:46 +0000 |
---|---|---|
committer | Alexander Botero-Lowry <alexbl@FreeBSD.org> | 2006-11-16 08:56:46 +0000 |
commit | bb7a253a8469492f9a9c15349ebfc1b5485882da (patch) | |
tree | 54d6646234015437c36ec0f5ba232fd7cdb2c171 /net-im/openfire/pkg-install | |
parent | 93d85f01a056b10f0fa08e182e66195cb6e31215 (diff) | |
download | ports-bb7a253a8469492f9a9c15349ebfc1b5485882da.tar.gz ports-bb7a253a8469492f9a9c15349ebfc1b5485882da.zip |
Notes
Diffstat (limited to 'net-im/openfire/pkg-install')
-rw-r--r-- | net-im/openfire/pkg-install | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/net-im/openfire/pkg-install b/net-im/openfire/pkg-install new file mode 100644 index 000000000000..afc5d45a2d2f --- /dev/null +++ b/net-im/openfire/pkg-install @@ -0,0 +1,36 @@ +#!/bin/sh + +PATH=/bin:/usr/sbin + +case $2 in +POST-INSTALL) + USER=wildfire + GROUP=${USER} + UID=340 + GID=${UID} + + if pw group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if pw groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -d /nonexistent -s /sbin/nologin -c "Wildfire Daemon" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + ;; +esac |