aboutsummaryrefslogtreecommitdiff
path: root/net-im/openfire/pkg-install
diff options
context:
space:
mode:
authorAlexander Botero-Lowry <alexbl@FreeBSD.org>2006-11-16 08:56:46 +0000
committerAlexander Botero-Lowry <alexbl@FreeBSD.org>2006-11-16 08:56:46 +0000
commitbb7a253a8469492f9a9c15349ebfc1b5485882da (patch)
tree54d6646234015437c36ec0f5ba232fd7cdb2c171 /net-im/openfire/pkg-install
parent93d85f01a056b10f0fa08e182e66195cb6e31215 (diff)
downloadports-bb7a253a8469492f9a9c15349ebfc1b5485882da.tar.gz
ports-bb7a253a8469492f9a9c15349ebfc1b5485882da.zip
Notes
Diffstat (limited to 'net-im/openfire/pkg-install')
-rw-r--r--net-im/openfire/pkg-install36
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