<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><style type="text/css"><!-- #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } #msg DL { border : 1px #006 solid; background-color : #369; padding : 6px; color : #fff; } #msg DT { float : left; width : 6em; font-weight : bold; } #msg DL, #msg DT, #msg UL, #msg LI { font-family : arial,helvetica,sans-serif; font-size : 10pt; } h3 { font-family : arial,helvetica,sans-serif; font-size : 10pt; font-weight : bold; } #msg PRE { overflow : auto; white-space : normal; background-color : #ffc; border : 1px #fc0 solid; padding : 6px; } #msg UL, PRE, .diff { overflow : auto; } #patch h4 { font-family : arial,helvetica,sans-serif; font-size : 10pt; } #patch h4 { padding: 8px; background : #369; color : #fff; margin : 0; } #patch .propset h4, #patch .binary h4 {margin: 0;} #patch pre {padding:0;line-height:1.2em;margin:0;} #patch .diff {background:#eeeeee;padding: 0 0 10px 0;} #patch .propset .diff, #patch .binary .diff {padding: 10px 0;} #patch span {display:block;padding:0 10px;} #patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;} #patch .add {background:#ddffdd;} #patch .rem {background:#ffdddd;} #patch .lines, .info {color:#888888;background:#ffffff;} .diff { width : 100%; } --></style> <title>[rhq-project.org rhq] [2009] the unix wrapper script should read in the env.sh so it can be configured the same way as rhq-agent.sh (such as the location of the agent, cmdline opts, vm opts, etc)</title> </head> <body> <div id="msg"> <dl> <dt>Revision</dt> <dd>2009</dd> <dt>Author</dt> <dd>mazz</dd> <dt>Date</dt> <dd>2008-11-16 00:04:16 -0600 (Sun, 16 Nov 2008)</dd> </dl> <h3>Log Message</h3> <pre>the unix wrapper script should read in the env.sh so it can be configured the same way as rhq-agent.sh (such as the location of the agent, cmdline opts, vm opts, etc)</pre> <h3>Modified Paths</h3> <ul> <li><a href="#rhqtrunkmodulesenterpriseagentsrcetcrhqagentwrappersh">rhq/trunk/modules/enterprise/agent/src/etc/rhq-agent-wrapper.sh</a></li> </ul> </div> <div id="patch"> <h3>Diff</h3> <a id="rhqtrunkmodulesenterpriseagentsrcetcrhqagentwrappersh"></a> <div class="modfile"><h4>Modified: rhq/trunk/modules/enterprise/agent/src/etc/rhq-agent-wrapper.sh (2008 => 2009)</h4> <pre class="diff"> <span class="info">--- rhq/trunk/modules/enterprise/agent/src/etc/rhq-agent-wrapper.sh 2008-11-16 02:23:54 UTC (rev 2008) +++ rhq/trunk/modules/enterprise/agent/src/etc/rhq-agent-wrapper.sh 2008-11-16 06:04:16 UTC (rev 2009) </span><span class="lines">@@ -16,8 +16,9 @@ </span><span class="cx"> # This script is customizable by setting the environment variables that # are accepted by the rhq-agent.sh script - see that script for more info. # </span><span class="rem">-# Note that if this script is to be used as an init.d script, you must set -# RHQ_AGENT_HOME so this script knows where to find the agent installation. </span><span class="add">+# Note that if this script is to be used as an init.d script, you must ensure +# this script has the RHQ_AGENT_HOME set so it knows where to find the +# agent installation. </span><span class="cx"> # # You may optionally set the RHQ_AGENT_PIDFILE_DIR environment variable if # you want to write the pidfile to a specific location. This value must </span><span class="lines">@@ -25,8 +26,16 @@ </span><span class="cx"> # be stored there. If not set, its default is the agent's bin directory. # ============================================================================= </span><span class="add">+RHQ_AGENT_WRAPPER_BIN_DIR_PATH=`dirname $0` + +# Read in the rhq-agent-env.sh file so we get the configured agent environment +if [ -f "${RHQ_AGENT_WRAPPER_BIN_DIR_PATH}/rhq-agent-env.sh" ]; then + . ${RHQ_AGENT_WRAPPER_BIN_DIR_PATH}/rhq-agent-env.sh $* +fi + </span><span class="cx"> # Here are some environment variables you can set to customize the launch </span><span class="rem">-# of the RHQ Agent. </span><span class="add">+# of the RHQ Agent. Consider setting them in the rhq-agent-env.sh before +# setting them here, it is probably better setting them in the env file instead. </span><span class="cx"> # RHQ_AGENT_HOME=/path/to/agent/home # RHQ_AGENT_PIDFILE_DIR=/var/run </span><span class="lines">@@ -37,10 +46,12 @@ </span><span class="cx"> # export RHQ_AGENT_ADDITIONAL_JAVA_OPTS=additional VM options # The --daemon argument is required, but you can add additional arguments as appropriate </span><span class="rem">-export RHQ_AGENT_CMDLINE_OPTS=--daemon </span><span class="add">+if [ "x$RHQ_AGENT_CMDLINE_OPTS" = "x" ]; then + export RHQ_AGENT_CMDLINE_OPTS=--daemon +fi </span><span class="cx"> # Determine where this script is, and change to its directory </span><span class="rem">-cd `dirname $0` </span><span class="add">+cd $RHQ_AGENT_WRAPPER_BIN_DIR_PATH </span><span class="cx"> THIS_SCRIPT_DIR=`pwd` THIS_SCRIPT=${THIS_SCRIPT_DIR}/`basename $0` </span> </pre> </div> </div> </body> </html> |