- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script Query
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 04:28 AM
10-16-2006 04:28 AM
Script Query
We have two environments running on the same box - develop and test. We need jboss to be up and running for either one of them .To point the jboss to either environments , I need to make a minor change to a file called oracle-ds.xml , just change the oracle SID in that file and also change the username and passwd for the DB in that file.
The standard distro scripts are attached herewith.
I need to make a change to the script so that I can restart the jboss logged in through the different userids for each environment.( called dev and test userids ) and it should automatically pick up the environment depending on the userid which is being used to run it. Can some incorporate the change in this script.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 04:30 AM
10-16-2006 04:30 AM
Re: Script Query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 04:45 AM
10-16-2006 04:45 AM
Re: Script Query
the content of the attached files does not contain any references to the above mentioned file oracle-ds.xml .
2nd, I cannot find a reference to LOGNAME, USER or other environment related stuff there, as well.
This makes it difficult to provide solutions...
There IS a reference to a non-default configuration file:
>>
# Read an optional running configuration file
if [ "x$RUN_CONF" = "x" ]; then
RUN_CONF="$DIRNAME/run.conf"
fi
if [ -r "$RUN_CONF" ]; then
. "$RUN_CONF"
fi
<<
What about setting
RUN_CONF=/path/to/my/configuration.conf
?
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 05:07 AM
10-16-2006 05:07 AM
Re: Script Query
Single box with JBOSS installed , to make it run for either of the two environments ( which have two different userids - dev and test ) I need to make a change in a file $JBOSS_HOME/server/default/deploy/oracle-ds.xml.
In my $JBOSS_HOME/server/default/deploy , i have created two more files by the name :
oracle-ds.xml.dev and oracle-ds.xml.test so that in my run.sh script I can have a way of determining thru which user i m running the jboss ( whoami ) and then overwrite the oracle-ds.xml and then start jboss.
The pieces which are missing are needed inside that script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 05:53 AM
10-16-2006 05:53 AM
Re: Script Query
if [ $LOGNAME -s "dev" ]
then
cp $JBOSS_HOME/server/default/deploy/oracle-ds.xml.dev \
$JBOSS_HOME/server/default/deploy/oracle-ds.xml
else
cp $JBOSS_HOME/server/default/deploy/oracle-ds.xml.test \
$JBOSS_HOME/server/default/deploy/oracle-ds.xml
fi
you could also use symbolic links.
NOTE: This has NOT been tested, as I don't have Oracle or J-Boss
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2006 05:55 AM
10-16-2006 05:55 AM
Re: Script Query
if [ $LOGNAME = "dev" ]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2006 01:50 AM
10-17-2006 01:50 AM