Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
rb:clearjmsqueue [24/01/2012 13:23] andrew |
rb:clearjmsqueue [10/10/2013 14:21] (current) |
||
---|---|---|---|
Line 2: | Line 2: | ||
- | [wworks@gy-rgs-app01 scripts]$ cat clear-jms-queue.sh | + | [wworks@app01 scripts]$ cat clear-jms-queue.sh |
#!/bin/bash | #!/bin/bash | ||
#Written 29/10/2010 by Andrew Stringer | #Written 29/10/2010 by Andrew Stringer | ||
Line 20: | Line 20: | ||
echo "Waiting for 10 seconds before starting. Quit now with Ctrl-C if you do not want to proceed." | echo "Waiting for 10 seconds before starting. Quit now with Ctrl-C if you do not want to proceed." | ||
sleep 10 | sleep 10 | ||
- | echo "OK, proceeding with JMS Queue clearing on gy-rgs-app01-04." | + | echo "OK, proceeding with JMS Queue clearing on app01-04." |
| | ||
DELAY=300 | DELAY=300 | ||
Line 26: | Line 26: | ||
| | ||
#Local server, rgs-app01 | #Local server, rgs-app01 | ||
- | echo "Stopping gy-rgs-app01...." | + | echo "Stopping app01...." |
/wworks/rgs/weblogic/prod/bin/weblogic.platform.managed stop | /wworks/rgs/weblogic/prod/bin/weblogic.platform.managed stop | ||
echo "Sleeping for 10 seconds before moving JMS file." | echo "Sleeping for 10 seconds before moving JMS file." | ||
Line 33: | Line 33: | ||
mv /wworks/rgs/weblogic/prod/data/jms/FILE-STORE* /var/tmp/ | mv /wworks/rgs/weblogic/prod/data/jms/FILE-STORE* /var/tmp/ | ||
| | ||
- | echo "Starting gy-rgs-app01." | + | echo "Starting app01." |
/wworks/rgs/weblogic/prod/bin/weblogic.platform.managed start | /wworks/rgs/weblogic/prod/bin/weblogic.platform.managed start | ||
sleep 60 | sleep 60 | ||
Line 40: | Line 40: | ||
JMSSIZE=`ls -l /wworks/rgs/weblogic/prod/data/jms/FILE-STORE*` | JMSSIZE=`ls -l /wworks/rgs/weblogic/prod/data/jms/FILE-STORE*` | ||
RESULT=$? | RESULT=$? | ||
- | #echo "gy-rgs-app01, ${RESULT}" | + | #echo "app01, ${RESULT}" |
#echo $JMSSIZE | #echo $JMSSIZE | ||
| | ||
if [ ${RESULT} != 0 ] | if [ ${RESULT} != 0 ] | ||
then | then | ||
- | echo "JMS queue has not been created on gy-rgs-app01, Quitting!" | + | echo "JMS queue has not been created on app01, Quitting!" |
echo "** ATTENTION!!! **" | echo "** ATTENTION!!! **" | ||
exit 1 | exit 1 | ||
else | else | ||
- | echo "New JMS Queue has been created on gy-rgs-app01, continuing with deleting tempory files." | + | echo "New JMS Queue has been created on app01, continuing with deleting temporary files." |
rm /var/tmp/FILE-STORE* | rm /var/tmp/FILE-STORE* | ||
fi | fi |