FreeBSD Bugzilla – Attachment 163807 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]
riemann.in patch
riemann_rc.diff (text/plain), 2.19 KB, created by
Davide D'Amico
on 2015-12-03 10:28:10 UTC
(
hide
)
Description:
riemann.in patch
Filename:
MIME Type:
Creator:
Davide D'Amico
Created:
2015-12-03 10:28:10 UTC
Size:
2.19 KB
patch
obsolete
>--- riemann.orig/files/riemann.in 2015-02-27 14:35:09.000000000 -0500 >+++ riemann/files/riemann.in 2015-12-03 05:26:16.138448000 -0500 >@@ -59,6 +59,9 @@ > command_args="-f -c -p ${riemann_pidfile} ${procname} ${riemann_java_opts} \ > -jar ${riemann_jarfile} ${riemann_config}" > required_files="${java_cmd} ${riemann_config}" >+status_cmd="riemann_status" >+start_cmd="riemann_start" >+stop_cmd="riemann_stop" > > riemann_prestart() > { >@@ -66,4 +69,72 @@ > } > start_precmd=${name}_prestart > >+riemann_start() >+{ >+ check_if_running=$(/usr/local/bin/jps | grep ${name} | awk '{print $1}') >+ if [ ! -z "${check_if_running}" ]; then >+ echo "${name} seems running (pid: ${check_if_running})." >+ return 1 >+ fi >+ >+ rc_pid=$(riemann_check_pidfile $riemann_pidfile) >+ if [ -z "$rc_pid" ]; then >+ echo "Starting ${name}." >+ ${command} ${command_args} >+ else >+ echo "${name} seems running ($rc_pid)." >+ return 1 >+ fi >+ >+} >+ >+riemann_status() >+{ >+ rc_pid=$(riemann_check_pidfile $riemann_pidfile) >+ >+ if [ -z "$rc_pid" ]; then >+ [ -n "$rc_fast" ] && return 0 >+ echo "${name} not running? (check $riemann_pidfile)." >+ return 1 >+ fi >+ echo "${name} is running as pid ${rc_pid}." >+} >+ >+riemann_check_pidfile() >+{ >+ _pidfile=$1 >+ if [ -z "$_pidfile" ]; then >+ err 3 'USAGE: riemann_check_pidfile pidfile' >+ fi >+ if [ ! -f $_pidfile ]; then >+ debug "pid file ($_pidfile): not readable." >+ return >+ fi >+ read _pid _junk < $_pidfile >+ if [ -z "$_pid" ]; then >+ debug "pid file ($_pidfile): no pid in file." >+ return >+ fi >+ if [ -n "`/usr/local/bin/jps -l | grep -e "^$_pid"`" ]; then >+ echo -n $_pid >+ fi >+} >+ >+riemann_stop() >+{ >+ rc_pid=$(riemann_check_pidfile $riemann_pidfile) >+ >+ if [ -z "$rc_pid" ]; then >+ [ -n "$rc_fast" ] && return 0 >+ echo "${name} not running? (check $riemann_pidfile)." >+ return 1 >+ fi >+ >+ echo "Stopping ${name}." >+ kill ${rc_pid} 2> /dev/null >+} >+ >+ >+ >+
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:
koobs
:
maintainer-approval-
Actions:
View
|
Diff
Attachments on
bug 204988
:
163804
|
163807
|
165624
|
165625