aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt/bigsister/pkg-install
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2004-03-25 15:15:30 +0800
committerbms <bms@FreeBSD.org>2004-03-25 15:15:30 +0800
commita64308caa6e62bf24392cf5f3f97b521cac30e95 (patch)
tree66891903e7b9f1a1057c0399a365417bf9dfdcc4 /net-mgmt/bigsister/pkg-install
parent45c72bd95345c323f6b2da07c3bc01d6179e1513 (diff)
downloadfreebsd-ports-gnome-a64308caa6e62bf24392cf5f3f97b521cac30e95.tar.gz
freebsd-ports-gnome-a64308caa6e62bf24392cf5f3f97b521cac30e95.tar.zst
freebsd-ports-gnome-a64308caa6e62bf24392cf5f3f97b521cac30e95.zip
Big Sister is a flexible network and system monitor with SNMP integration
and a web interface.
Diffstat (limited to 'net-mgmt/bigsister/pkg-install')
-rw-r--r--net-mgmt/bigsister/pkg-install51
1 files changed, 51 insertions, 0 deletions
diff --git a/net-mgmt/bigsister/pkg-install b/net-mgmt/bigsister/pkg-install
new file mode 100644
index 000000000000..c0e7ef7b691b
--- /dev/null
+++ b/net-mgmt/bigsister/pkg-install
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+PATH=/bin:/usr/sbin
+
+SANDBOX_DIR="/disabled"
+
+if [ -z "${BS_USER}" ]; then
+ BS_USER=bs
+fi
+
+if [ -z "${BS_GROUP}" ]; then
+ BS_GROUP=bs
+fi
+
+case $2 in
+ PRE-INSTALL)
+ UID=220
+ GID=${UID}
+ if pw group show "${BS_GROUP}" 2>/dev/null; then
+ echo "You already have a group \"${BS_GROUP}\", so I will use it."
+ else
+ if pw groupadd ${BS_GROUP} -g ${GID}; then
+ echo "Added group \"${BS_GROUP}\."
+ else
+ echo "Adding group \"${BS_GROUP}\" failed."
+ exit 1
+ fi
+ fi
+
+ if pw user show "${BS_USER}" 2>/dev/null; then
+ echo "You already have a user \"${BS_USER}\", so I will use it."
+ if pw usermod ${BS_USER} -d ${SANDBOX_DIR}
+ then
+ echo "Changed home directory of \"${BS_USER}\" to \"${SANDBOX_DIR}\""
+ else
+ echo "Changing home directory of \"${BS_USER}\" to \"${SANDBOX_DIR}\" failed..."
+ exit 1
+ fi
+ else
+ if pw useradd ${BS_USER} -u ${UID} -g ${BS_GROUP} -h - \
+ -d ${SANDBOX_DIR} -s /sbin/nologin -c "Big Sister"
+ then
+ echo "Added user \"${BS_USER}\"."
+ else
+ echo "Adding user \"${BS_USER}\" failed..."
+ exit 1
+ fi
+ fi
+
+ ;;
+esac