- Add UID and GID entries for net/rabbitmq.
- Convince RC script to use rabbitmq user. PR: ports/128108 Submitted by: Nick Barkas <snb@threerings.net> Approved by: Phillip N. <pneumann@gmail.com> (maintainer)
This commit is contained in:
parent
0cdc5a16cf
commit
286741f08d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=222183
4 changed files with 17 additions and 20 deletions
1
GIDs
1
GIDs
|
@ -66,6 +66,7 @@ _ospfd:*:131:
|
|||
_spamd:*:132:
|
||||
freeradius:*:133:
|
||||
undernet:*:134:
|
||||
rabbitmq:*:135:
|
||||
dovecot:*:143:
|
||||
rbldns:*:153:
|
||||
sfs:*:171:
|
||||
|
|
1
UIDs
1
UIDs
|
@ -74,6 +74,7 @@ _ospfd:*:131:131::0:0:OSPF Daemon:/var/empty:/usr/sbin/nologin
|
|||
_spamd:*:132:132::0:0:Spam Daemon:/var/empty:/usr/sbin/nologin
|
||||
freeradius:*:133:133::0:0:FreeRADIUS Daemon:/nonexistent:/usr/sbin/nologin
|
||||
undernet:*:134:134::0:0:Undernet ircu Daemon:/nonexistant:/usr/sbin/nologin
|
||||
rabbitmq:*:135:135::0:0:RabbitMQ:/var/db/rabbitmq:/usr/sbin/nologin
|
||||
cricket:*:141:80::0:0:Cricket Monitoring User:/usr/local/cricket:/usr/sbin/nologin
|
||||
dovecot:*:143:143::0:0:Dovecot User:/var/empty:/usr/sbin/nologin
|
||||
rbldns:*:153:153::0:0:rbldnsd pseudo-user:/nonexistent:/usr/sbin/nologin
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= rabbitmq
|
||||
PORTVERSION= 1.4.0
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= http://www.rabbitmq.com/releases/rabbitmq-server/v${PORTVERSION}/
|
||||
DISTNAME= ${PORTNAME}-server-${PORTVERSION}
|
||||
|
@ -24,6 +24,9 @@ MAKE_ENV+= TARGET_DIR="${PREFIX}/lib/erlang/lib/rabbitmq_server-${PORTVERSION}"
|
|||
SCRIPTS_DIR= ${WRKSRC}/scripts/
|
||||
USE_RC_SUBR= rabbitmq
|
||||
PLIST_SUB= "VERSION=${PORTVERSION}"
|
||||
SUB_FILES= pkg-install
|
||||
RABBITMQ_USER= rabbitmq
|
||||
RABBITMQ_GROUP= ${RABBITMQ_USER}
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|/etc/default|${PREFIX}/etc/rabbitmq|g ; s|/var/lib|/var/db|g ; s|erl|${PREFIX}/bin/erl|g' \
|
||||
|
@ -31,7 +34,10 @@ post-patch:
|
|||
|
||||
@${FIND} ${WRKSRC} -name "*.bak" | ${XARGS} ${RM}
|
||||
|
||||
post-install:
|
||||
@${MKDIR} /var/log/rabbitmq /var/db/rabbitmq/mnesia ${PREFIX}/etc/rabbitmq
|
||||
pre-install:
|
||||
@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
|
||||
post-install:
|
||||
@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -14,28 +14,17 @@
|
|||
|
||||
. "%%RC_SUBR%%"
|
||||
|
||||
name=rabbitmq
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
# Set some defaults
|
||||
rabbitmq_enable=${rabbitmq_enable:-"NO"}
|
||||
rabbitmq_user=${rabbitmq_user:-"rabbitmq"}
|
||||
|
||||
prefix=%%PREFIX%%
|
||||
name=rabbitmq
|
||||
start_cmd="${name}_start"
|
||||
stop_cmd="${name}_stop"
|
||||
start_cmd="env HOME=/var/db/rabbitmq su -m ${rabbitmq_user} -c 'sh -c \"${prefix}/sbin/rabbitmq-server -detached\"'"
|
||||
stop_cmd="env HOME=/var/db/rabbitmq su -m ${rabbitmq_user} -c 'sh -c \"${prefix}/sbin/rabbitmqctl stop\"'"
|
||||
|
||||
rabbitmq_start()
|
||||
{
|
||||
${prefix}/sbin/rabbitmq-server -detached
|
||||
echo "RabbitMQ started"
|
||||
}
|
||||
|
||||
rabbitmq_stop()
|
||||
{
|
||||
${prefix}/sbin/rabbitmqctl stop
|
||||
}
|
||||
|
||||
rcvar=`set_rcvar`
|
||||
load_rc_config $name
|
||||
|
||||
|
||||
|
||||
run_rc_command "$1"
|
||||
|
|
Loading…
Reference in a new issue