FreeBSD Bugzilla – Attachment 165624 Details for
Bug 204988
net-mgmt/riemann: Startup script doesn't work if more than one java process is running
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
use daemon and rc.subr better
0001-net-mgmt-riemann-simplify-pidfile-handling.patch (text/plain), 3.19 KB, created by
Dave Cottlehuber
on 2016-01-15 10:02:51 UTC
(
hide
)
Description:
use daemon and rc.subr better
Filename:
MIME Type:
Creator:
Dave Cottlehuber
Created:
2016-01-15 10:02:51 UTC
Size:
3.19 KB
patch
obsolete
>From 9f006ed4931fb39ff818b7bbd3ac43638167e70e Mon Sep 17 00:00:00 2001 >From: Dave Cottlehuber <dch@skunkwerks.at> >Date: Thu, 14 Jan 2016 15:12:54 +0100 >Subject: [PATCH] net-mgmt/riemann: simplify pidfile handling > >--- > net-mgmt/riemann/Makefile | 8 ++++---- > net-mgmt/riemann/files/riemann.in | 10 ++++++---- > net-mgmt/riemann/pkg-plist | 1 - > 3 files changed, 10 insertions(+), 9 deletions(-) > >diff --git a/net-mgmt/riemann/Makefile b/net-mgmt/riemann/Makefile >index 65c49b3..0d0941a 100644 >--- a/net-mgmt/riemann/Makefile >+++ b/net-mgmt/riemann/Makefile >@@ -3,6 +3,7 @@ > > PORTNAME= riemann > PORTVERSION= 0.2.10 >+PORTREVISION= 1 > CATEGORIES= net-mgmt java > MASTER_SITES= https://wintermute.skunkwerks.at/${PORTNAME}/releases/${PORTVERSION}/ \ > http://aphyr.com/${PORTNAME}/ >@@ -22,13 +23,13 @@ SUB_FILES= ${PORTNAME} > SUB_LIST+= JAVA_HOME=${JAVA_HOME} \ > RIEMANN_USER=${RIEMANN_USER} \ > RIEMANN_GROUP=${RIEMANN_GROUP} \ >- RIEMANN_PIDDIR=${RIEMANN_PIDDIR} \ >+ RIEMANN_PIDFILE=${RIEMANN_PIDFILE} \ > RIEMANN_LOGDIR=${RIEMANN_LOGDIR} > > PLIST_SUB= JAVA_HOME=${JAVA_HOME} \ > RIEMANN_USER=${RIEMANN_USER} \ > RIEMANN_GROUP=${RIEMANN_GROUP} \ >- RIEMANN_PIDDIR=${RIEMANN_PIDDIR} \ >+ RIEMANN_PIDFILE=${RIEMANN_PIDFILE} \ > RIEMANN_LOGDIR=${RIEMANN_LOGDIR} > > RIEMANN_USER?= ${PORTNAME} >@@ -44,13 +45,12 @@ GROUPS= ${PORTNAME} > USE_RC_SUBR= ${PORTNAME} > > RIEMANN_LOGDIR= /var/log/${PORTNAME}/ >-RIEMANN_PIDDIR= /var/run/${PORTNAME}/ >+RIEMANN_PIDFILE= /var/run/${PORTNAME}.pid > > do-install: > ${MKDIR} \ > ${STAGEDIR}${JAVAJARDIR} \ > ${STAGEDIR}${ETCDIR} \ >- ${STAGEDIR}${RIEMANN_PIDDIR} \ > ${STAGEDIR}${RIEMANN_LOGDIR} > ${INSTALL_DATA} \ > ${WRKSRC}/lib/${PORTNAME}.jar \ >diff --git a/net-mgmt/riemann/files/riemann.in b/net-mgmt/riemann/files/riemann.in >index 6519aac..6c833aa 100644 >--- a/net-mgmt/riemann/files/riemann.in >+++ b/net-mgmt/riemann/files/riemann.in >@@ -36,6 +36,7 @@ load_rc_config $name > : ${riemann_min_mem:="256m"} > : ${riemann_max_mem:="1g"} > : ${riemann_java_opts:=" -server \ >+ -Dapp=${name} \ > -Xms${riemann_min_mem} \ > -Xmx${riemann_max_mem} \ > -Xss256k \ >@@ -53,16 +54,17 @@ load_rc_config $name > -XX:+UseParNewGC \ > -XX:CMSInitiatingOccupancyFraction=75 "} > >-riemann_pidfile="%%RIEMANN_PIDDIR%%${name}.pid" >+pidfile="%%RIEMANN_PIDFILE%%" > command="/usr/sbin/daemon" >-procname="${riemann_java_home}/bin/java" >-command_args="-f -c -p ${riemann_pidfile} ${procname} ${riemann_java_opts} \ >+command_args="-f -c -r -P ${pidfile} \ >+ ${riemann_java_home}/bin/java \ >+ ${riemann_java_opts} \ > -jar ${riemann_jarfile} ${riemann_config}" > required_files="${java_cmd} ${riemann_config}" > > riemann_prestart() > { >- install -o ${riemann_user} /dev/null ${riemann_pidfile} >+ install -o ${riemann_user} /dev/null ${pidfile} > } > start_precmd=${name}_prestart > >diff --git a/net-mgmt/riemann/pkg-plist b/net-mgmt/riemann/pkg-plist >index 8b7d7cb..539ec01 100644 >--- a/net-mgmt/riemann/pkg-plist >+++ b/net-mgmt/riemann/pkg-plist >@@ -1,4 +1,3 @@ > %%JAVAJARDIR%%/riemann.jar > @sample %%ETCDIR%%/riemann.config.sample > @dir(%%RIEMANN_USER%%,%%RIEMANN_GROUP%%,0750) %%RIEMANN_LOGDIR%% >-@dir(%%RIEMANN_USER%%,%%RIEMANN_GROUP%%,0750) %%RIEMANN_PIDDIR%% >-- >2.7.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dch
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 204988
:
163804
|
163807
|
165624
|
165625