diff options
author | wxs <wxs@FreeBSD.org> | 2008-10-29 09:02:22 +0800 |
---|---|---|
committer | wxs <wxs@FreeBSD.org> | 2008-10-29 09:02:22 +0800 |
commit | 8055ce54276c1992b508f15b209b73ecf96cd86e (patch) | |
tree | 2656addece1488e9051295a7f2013e48eac6607a /net | |
parent | a54e946370b6ca72488650a2aa238cd9027ec885 (diff) | |
download | freebsd-ports-gnome-8055ce54276c1992b508f15b209b73ecf96cd86e.tar.gz freebsd-ports-gnome-8055ce54276c1992b508f15b209b73ecf96cd86e.tar.zst freebsd-ports-gnome-8055ce54276c1992b508f15b209b73ecf96cd86e.zip |
Add missing pkg-install.in which I forgot in my last commit.
Diffstat (limited to 'net')
-rw-r--r-- | net/rabbitmq/files/pkg-install.in | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/net/rabbitmq/files/pkg-install.in b/net/rabbitmq/files/pkg-install.in new file mode 100644 index 000000000000..6dc6a8397ca5 --- /dev/null +++ b/net/rabbitmq/files/pkg-install.in @@ -0,0 +1,41 @@ +#!/bin/sh + +RABBITMQ_USER=rabbitmq +RABBITMQ_GROUP=${RABBITMQ_USER} +RABBITMQ_UID=135 +RABBITMQ_GID=${RABBITMQ_UID} + +case $2 in +PRE-INSTALL) + + if ! pw group show "${RABBITMQ_GROUP}" > /dev/null; then + if pw groupadd ${RABBITMQ_GROUP} -g ${RABBITMQ_GID}; then + echo "Added group \"${RABBITMQ_GROUP}\"." + else + echo "Adding group \"${RABBITMQ_GROUP}\" failed..." + exit 1 + fi + fi + + if ! pw user show "${RABBITMQ_USER}" > /dev/null; then + if pw useradd ${RABBITMQ_USER} -u ${RABBITMQ_UID} \ + -g ${RABBITMQ_GROUP} -h - -d /var/db/rabbitmq \ + -s /usr/sbin/nologin -c "RabbitMQ" + then + echo "Added user \"${RABBITMQ_USER}\"." + else + echo "Adding user \"${RABBITMQ_USER}\" failed..." + exit 1 + fi + fi +;; + +POST-INSTALL) + mkdir -p %%PREFIX%%/etc/rabbitmq + mkdir -p /var/db/rabbitmq/mnesia + mkdir -p /var/log/rabbitmq + chown -R ${RABBITMQ_USER}:${RABBITMQ_GROUP} /var/db/rabbitmq + chown -R ${RABBITMQ_USER}:${RABBITMQ_GROUP} /var/log/rabbitmq +;; + +esac |