Skip to main content
fixed grammer
Source Link
slm
  • 380.1k
  • 127
  • 793
  • 897

I have to write a script to run jbossJBoss and also verify and inform jboss isJBoss has just started in system startup. Below Below code is to related to verifying part. Please correct logical and syntax mistakes II have done.

Log record I am greping : 2017-10-27 12:04:13,933 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:1sgreping:804ms

!/bin/bash

maxLoops=30 numLines=200 timeToSleep=3 success=0 Server_Log=$(/path_for_log/server.log)

2017-10-27 12:04:13,933 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:1s:804ms

!/bin/bash maxLoops=30 numLines=200 timeToSleep=3 success=0 Server_Log=$(/path_for_log/server.log)  for (( try=0; try < maxLoops; ++try ));   do   atail=`tail -n $numLines $Server_Log | grep "Started" | awk {'print $12'}`   if [[ $atail == "Started" ]]   then   success=1   break   fi   sleep $timeToSleep   done   if (( success ));   then   echo "Jboss started successfully"   else   echo "successful starting of Jboss is not ensured"   fi 

fi

Please find the error below that I am getting while executing the script as root

./verify_jboss.sh: line 3: /log_path/server.log: Permission denied

$ ./verify_jboss.sh: line 3: /log_path/server.log: Permission denied 

I have to write a script to run jboss and also verify and inform jboss is just started in system startup. Below code is to related to verifying part. Please correct logical and syntax mistakes I have done.

Log record I am greping : 2017-10-27 12:04:13,933 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:1s:804ms

!/bin/bash

maxLoops=30 numLines=200 timeToSleep=3 success=0 Server_Log=$(/path_for_log/server.log)

 for (( try=0; try < maxLoops; ++try )); do atail=`tail -n $numLines $Server_Log | grep "Started" | awk {'print $12'}` if [[ $atail == "Started" ]] then success=1 break fi sleep $timeToSleep done if (( success )); then echo "Jboss started successfully" else echo "successful starting of Jboss is not ensured" 

fi

Please find the error below that I am getting while executing the script as root

./verify_jboss.sh: line 3: /log_path/server.log: Permission denied

I have to write a script to run JBoss and also verify and inform JBoss has just started in system startup. Below code is to related to verifying part. Please correct logical and syntax mistakes I have done.

Log record I am greping:

2017-10-27 12:04:13,933 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:1s:804ms

!/bin/bash maxLoops=30 numLines=200 timeToSleep=3 success=0 Server_Log=$(/path_for_log/server.log)  for (( try=0; try < maxLoops; ++try ));   do   atail=`tail -n $numLines $Server_Log | grep "Started" | awk {'print $12'}`   if [[ $atail == "Started" ]]   then   success=1   break   fi   sleep $timeToSleep   done   if (( success ));   then   echo "Jboss started successfully"   else   echo "successful starting of Jboss is not ensured"   fi 

Please find the error below that I am getting while executing the script as root:

$ ./verify_jboss.sh: line 3: /log_path/server.log: Permission denied 

I have to write a script to run jboss and also verify and inform jboss is just started in system startup. Below code is to related to verifying part. Please correct logical and syntax mistakes I have done.

Log record I am greping : 2017-10-27 12:04:13,933 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:1s:804ms

!/bin/bash

maxLoops=30 numLines=200 timeToSleep=3 success=0 Server_Log=$(/path_for_log/server.log)

 for (( try=0; try < maxLoops; ++try )); do atail=`tail -n $numLines $Server_Log | grep "Started" | awk {'print $12'}` if [[ $atail == "Started" ]] then success=1 break fi sleep $timeToSleep done if (( success )); then echo "Jboss started successfully" else echo "successful starting of Jboss is not ensured" 

fi

Please found belowfind the error below that I am getting a error while executing the script as root

./verify_jboss.sh: line 3: /log_path/server.log: Permission denied

I have to write a script to run jboss and also verify and inform jboss is just started in system startup. Below code is to related to verifying part. Please correct logical and syntax mistakes I have done.

Log record I am greping : 2017-10-27 12:04:13,933 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:1s:804ms

!/bin/bash

maxLoops=30 numLines=200 timeToSleep=3 success=0 Server_Log=$(/path_for_log/server.log)

 for (( try=0; try < maxLoops; ++try )); do atail=`tail -n $numLines $Server_Log | grep "Started" | awk {'print $12'}` if [[ $atail == "Started" ]] then success=1 break fi sleep $timeToSleep done if (( success )); then echo "Jboss started successfully" else echo "successful starting of Jboss is not ensured" 

fi

Please found below error that I am getting a error while executing script as root

./verify_jboss.sh: line 3: /log_path/server.log: Permission denied

I have to write a script to run jboss and also verify and inform jboss is just started in system startup. Below code is to related to verifying part. Please correct logical and syntax mistakes I have done.

Log record I am greping : 2017-10-27 12:04:13,933 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:1s:804ms

!/bin/bash

maxLoops=30 numLines=200 timeToSleep=3 success=0 Server_Log=$(/path_for_log/server.log)

 for (( try=0; try < maxLoops; ++try )); do atail=`tail -n $numLines $Server_Log | grep "Started" | awk {'print $12'}` if [[ $atail == "Started" ]] then success=1 break fi sleep $timeToSleep done if (( success )); then echo "Jboss started successfully" else echo "successful starting of Jboss is not ensured" 

fi

Please find the error below that I am getting while executing the script as root

./verify_jboss.sh: line 3: /log_path/server.log: Permission denied

deleted 57 characters in body
Source Link
Prabash
  • 65
  • 3
  • 11

I have to write a script to run jboss and also verify and inform jboss is just started in system startup. Below code is to related to verifying part. Please correct logical and syntax mistakes I have done.

Log record I am greping : 2017-10-27 12:04:13,933 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:1s:804ms

!/bin/bash

maxLoops=30 numLines=200 timeToSleep=3 success=0 Server_Log=$(/path_for_log/server.log)

 for (( try=0; try < maxLoops; ++try )); do atail=`tail -n $numLines $Server_Log | grep "Started" | awk {'print $12'}` if [[ $atail == "Started" ]] then success=1 break fi sleep $timeToSleep done if (( success )); then echo "Jboss started successfully" else echo "successful starting of Jboss is not ensured" 

fi

Please found below error that I am getting a error while executing script as root

./verify_jboss.sh: line 3: /home/hutch-alco-two/deploy/jboss-5.1.0.GA-smpp/server/default/loglog_path/server.log: Permission denied

I have to write a script to run jboss and also verify and inform jboss is just started in system startup. Below code is to related to verifying part. Please correct logical and syntax mistakes I have done.

Log record I am greping : 2017-10-27 12:04:13,933 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:1s:804ms

!/bin/bash

maxLoops=30 numLines=200 timeToSleep=3 success=0 Server_Log=$(/path_for_log/server.log)

 for (( try=0; try < maxLoops; ++try )); do atail=`tail -n $numLines $Server_Log | grep "Started" | awk {'print $12'}` if [[ $atail == "Started" ]] then success=1 break fi sleep $timeToSleep done if (( success )); then echo "Jboss started successfully" else echo "successful starting of Jboss is not ensured" 

fi

Please found below error that I am getting a error while executing script as root

./verify_jboss.sh: line 3: /home/hutch-alco-two/deploy/jboss-5.1.0.GA-smpp/server/default/log/server.log: Permission denied

I have to write a script to run jboss and also verify and inform jboss is just started in system startup. Below code is to related to verifying part. Please correct logical and syntax mistakes I have done.

Log record I am greping : 2017-10-27 12:04:13,933 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 1m:1s:804ms

!/bin/bash

maxLoops=30 numLines=200 timeToSleep=3 success=0 Server_Log=$(/path_for_log/server.log)

 for (( try=0; try < maxLoops; ++try )); do atail=`tail -n $numLines $Server_Log | grep "Started" | awk {'print $12'}` if [[ $atail == "Started" ]] then success=1 break fi sleep $timeToSleep done if (( success )); then echo "Jboss started successfully" else echo "successful starting of Jboss is not ensured" 

fi

Please found below error that I am getting a error while executing script as root

./verify_jboss.sh: line 3: /log_path/server.log: Permission denied

edited title
Link
Prabash
  • 65
  • 3
  • 11
Loading
Source Link
Prabash
  • 65
  • 3
  • 11
Loading