-
1. Problem whith shell script execution on RHQ UI
rafaelcba Dec 8, 2008 11:33 AM (in response to rafaelcba)Can someone help me with this issue?
-
2. Re: Script's execution
joe.marques Jan 15, 2009 11:39 AM (in response to rafaelcba)Yes, you can set variables that will be passed as the environment to the process that executes the script. If you look at the inventory tab of the Script resource, you'll see this comment for "Environment Variables":
"the environment variables that will be passed to the script; each variable must be on a new line and have the syntax name=value; the variable's value can contain properties with the syntax %propertyName%; the script plugin will interpolate these with the current values of the corresponding properties from the script's parent JBossAS server's connection properties"
So, let's say I set the "Environment Variables" value to:
JBOSS_SERVER_NAME=%configurationSet%
JBOSS_SERVER_HOME_DIR=%configurationPath%
And my script contents are as follows:
echo %JBOSS_SERVER_NAME%
echo %JBOSS_SERVER_HOME_DIR%
Then the output of the operation will be something like the following:
Exit Code
0
Output
C:\dev\dev-container\jbossas\bin>echo default
default
C:\dev\dev-container\jbossas\bin>echo C:\dev\dev-container\jbossas\server\default
C:\dev\dev-container\jbossas\server\default
This example is for Windows obviously, but the same principles apply equal well to Linux-based scripts. -
3. Re: Script's execution
rafaelcba Jan 23, 2009 3:59 PM (in response to rafaelcba)Yes Marques!
Works!
Thanks!