Programming :: Bash Script For Shutting Down Jboss?
Oct 13, 2010
I would like to use a bash script to modernize my bash script for shutting down my jboss applications.
the first script is:
#!/bin/bash
#################################################
[code]...
View 1 Replies
ADVERTISEMENT
Mar 18, 2011
I have apache ,jboss and jon instances on various linux boxes.I need to create a generic startup script to restart those instances on server reboot.The script requirement is :It should take the name of instances from one text file named active-servers and recycle those instances.1. start-mws-servers (generic script for /etc/rc.d but just create it in ~/bin dir for current testing)It simply searches ~/bin/active-servers for active server recycle scriptsIt executes each recycle script and passes it the 'start' commandIt logs results to /tmp/start-mws-servers.
View 1 Replies
View Related
Feb 4, 2011
I would like to know how do I print the line # in a script. My requirement is, I have a script which is about ~5000 lines long. If there are any errors happen I just exit. And I would like to add the line # of the script where the error happened.
View 3 Replies
View Related
Jan 24, 2010
simple bash code:
Code:
#!/bin/bash
trap "echo 'you got me'" SIGINT SIGTERM # to trap ctrl+c
echo "Press ctrl+c during 5 sec loop"
for ((i=0;i<5;i++)); do
[Code]...
How come code behaves normally and stops when ctrl+c signal is caught and resumes, but after I use at least one timeout read in the code it looks like, if signal is caught again it doesn't pause the execution but skips the loop. If you remove -t (timeout) option from the read, both loops look the same!
View 10 Replies
View Related
Nov 26, 2008
I have a config file that contains:
my.config:
Code:
Now in my bash script, I want to get the output /home/user instead of $HOME once read. So far, I have managed to get the $HOME variable but I can't get it to echo the variable. All I get is the output $HOME.
Here is my parse_cmd script:
Code:
View 3 Replies
View Related
Jul 25, 2011
I have written quite a few separate bash & scripts and php scripts that up to now I have run from cron jobs. However I have to estimate how long each takes to run, before running the next and so it probably takes much longer than necessary to run them all. They have to run in order.
Now there are so many I am thinking it would be better to have a master bash script that would run one after the other, but I am not sure how to get the master script to wait before starting to run the next script. Is this possible and is there a command that will make the script wait between bash and php scripts , for them to finish, before running the next?
View 5 Replies
View Related
Jan 9, 2010
I would like to get the filename (without extension) and the extension separately. The best solution I found so far is:
Let FILE="thefilenameofsomefilesfor_instance.txt"
Code:
NAME=`echo "$FILE" | cut -d'.' -f1`
EXTENSION=`echo "$FILE" | cut -d'.' -f2`
I think it would be better to count the len and remove 3 chars to right to get the extension, but it can be macintosh filenames with have 4 chars for extensions.
View 5 Replies
View Related
Mar 31, 2011
I need to rename the resulted searched files from a loopI have the following code:
find . -name DOC* | while read i
do
find $i -type f -name '*.txt'
done
basically, I am searching for all txt files inside any folder starting with DOC name.this code is working fine with me.I need to rename those .txt files to .txtOLDOS: Ubuntu 10.4Bash shell
View 10 Replies
View Related
May 25, 2011
I need to make a script that controls or checks certain assets of a JBoss server. Like if the server is running or down, or how much memory he uses, etc.Now, via the website of Nagios, i've found a script which i can use.Where can i find the things i need to check on this?On the JBoss server i get an overview of everything, but i really don't have a clue where to start looking.
View 2 Replies
View Related
Aug 1, 2011
I've seen a few articles out there, but most are old and out of date.
What needs to be done, specifically, to Jboss to ready it for deployment?
Ive alreday removed the jmx-console, web-console and jbosswc. What else would you remove/change to ready it for real production? (Jboss 4.2)
View 1 Replies
View Related
Jan 29, 2011
I am trying to write a bash script that sources another bash script. Essentially, I need a few lines to check to see if a certain variable is set. If not, I set it manually, and then source a scripts with that variable in the path. I wrote a test script to try it, but for some reason the last line does not work. Here is what I wrote:
#!/bin/sh
source ~setupdir/setup.shrc #just a test, this line works
echo ${#SETUP} # prints 0 if setup is not set, which it isn't
if [ ${#SETUP} -eq 0 ]
then
SETUP="~setupdir"
fi
echo $SETUP # prints ~setupdir
[Code]...
View 5 Replies
View Related
Mar 3, 2010
I have been following the link:[URL]for understanding the log4sh.How can I put it to work for my jboss GC logs?I dont want to use log4j for some reason.
View 1 Replies
View Related
Nov 9, 2010
How can I make Jboss 5.1 as a service? Whereby, I don't have to run it from ssh/command line to have it started.
View 14 Replies
View Related
Oct 8, 2010
I'm currently trying to stop JBoss and I'm not able to accomplish it, have look everywhere... java, etc, no idea.It was working well and then it just stopped.no changes were made from a Jboss perspective.
View 4 Replies
View Related
Aug 3, 2011
For some reason I need to use CentOS 4.8.I installed Java 1.6.26 and JBOSS 5.1 on CentOS 4.8. However, When I use ./run.sh to run JBOSS I get the following message:/bin/run.jaring required file: /opt/java/jbosswhere /opt/java/jboss is the link to the JBOSS installation directory. Nothing else happens and there is no log.I tried the search the error message, but got no hints
View 2 Replies
View Related
Mar 25, 2010
I have try to startup jboss on linux, but it does not work,the jdk is installed and Tomcat is okay
/etc/profile
export JAVA_HOME=/usr/java/jdk1.6.0
export TOMCAT_HOME=/usr/apache-tomcat-6.0.18
[code]...
View 1 Replies
View Related
Jan 3, 2011
I want to change the default path for logs in Jboss running on Fedora box? How to do the same?
View 1 Replies
View Related
Jun 11, 2010
I would like to install SUns (not JBoss) J2EE (not only JDK).
How can I do this ?
I did not found it in Synaptics
View 1 Replies
View Related
Jul 30, 2010
16:46:50,375 INFO [AbstractJBossASServerBase] Server Configuration:
JBOSS_HOME URL: file:/C:/jboss-6.0.0.20100721-M4/
Bootstrap: $JBOSS_HOMEserver/default/conf/bootstrap.xml
Common Base: $JBOSS_HOMEcommon/
[code]....
View 1 Replies
View Related
Aug 27, 2010
As we have planned to implement jboss web server. i am curious gather some information about it.My question is where jboss stores the deployed file. Because jboss server starts with no error.but i cant able to access my application.Its showing 404 error.I just want to know the path where jboss stores the deployed file or the any log files that tells the story.
View 3 Replies
View Related
May 14, 2011
I want to copy a file to all RHQ-Agents through out RHQ-Console.
View 1 Replies
View Related
Jun 28, 2010
How to start jboss portal in command mode???
View 1 Replies
View Related
Jan 3, 2011
how to start or stop Jboss at boot time?
View 1 Replies
View Related
Sep 29, 2010
We are using a webserver and application server for our portal. When my JBoss application is down on the application server, a maintenance page is shown to the user when the user tries to access the portal. When the JBoss application on the application server is up, the webserver redirects the request to the JBoss application server. Now, while the JBoss application is up and I replace the contents of index.html page in apache with the maintenance page contents.
Still the webserver redirects the request to the JBoss application server and the contents of index.html are not shown to the user. I am not able to find out any configurations for this automatic redirection in webserver. By automatic, I mean if the JBoss application is up, then redirect the request to the application server, else show maintenance page. What I want to do is show maintenance page even when my JBoss application is up.
View 1 Replies
View Related
May 25, 2010
Normally one can start the Jboss with
Code:
./run.sh -c server-name
But in this way the command console will keep hang. Now I want to write a script which calls u this command and return back to the command console. Here is what I wrote but it doesn't return back to the command console:
Code:
#!/bin/sh
MSGBP_HOME="/opt/jboss/MSGBP"
case "$1" in
start)
[code]...
View 1 Replies
View Related
Jan 27, 2011
I am using SUSE enterprise server 11 SP1. I have jboss server application 4.0.5 GA in the above O.S where I have some problem in running the jboss. How and where to download the latest jboss server for the O.S
View 1 Replies
View Related
Jul 13, 2011
i'm in the process of learing C++. currently i'm creating shell scripts to get things done. i'm just curious how, as a programmer using C++ you would get a similar job done.as an example i have a script that takes the contents of files, pipes it to some sed and awk commands, which is piped to create a new file. that file is then imported into a mysql database.if you were going to do this in C++, would you call the sed/awk programs to modify the file, or can it be done within the program itself? i'm probably jumping the gun here because i've just started learing about pointers so this is above my ability
View 12 Replies
View Related
Sep 8, 2010
Is it possible to do jboss application server fail over by using heartbeat on rhel5?
View 1 Replies
View Related
Mar 25, 2011
I have beat this enough and don't get what should have been a very simple thing to do. I build a variable;
Code:
CLIST=java,lua,python,php,perl,ruby,tcl
CLIST will be used by another bash script but I need to replace the commas with a space. I
[code]...
View 2 Replies
View Related
Dec 4, 2010
Creating script that converts hex to dec. But without using bc calculator or other methods that could convert it in one line. I need to make something like this script that converts dec to hex.
View 1 Replies
View Related