Last active
September 24, 2015 02:13
-
-
Save vanduc1102/4cacc316be7911ef3a97 to your computer and use it in GitHub Desktop.
Batch forced restart Jboss on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This batch created by follwed these documents | |
# 1. http://oracleflash.com/20/How-to-kill-all-processes-with-one-command-in-Linux.html | |
# 2. http://www.thegeekstuff.com/2010/01/awk-introduction-tutorial-7-awk-print-examples/ | |
# | |
echo "Start restart jboss" | |
kill -9 `ps aux | grep jboss | awk '$NF ~/jboss-as-7.1.1/ {print $2}'` | |
echo "Stopped jboss. Relax in 3 seconds." | |
sleep 3 | |
echo "Start jboss" | |
standalone.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment