Skip to content

Instantly share code, notes, and snippets.

@pamtrak06
Created December 3, 2017 20:49
Show Gist options
  • Save pamtrak06/061b9c0bf4b63be00fc946fb910314e2 to your computer and use it in GitHub Desktop.
Save pamtrak06/061b9c0bf4b63be00fc946fb910314e2 to your computer and use it in GitHub Desktop.
bash script to check if jboss 7.1.1 is running
#!/bin/bash
function check_jboss_is_running() {
echo "INFO: Waiting for JBoss to startup..."
echo -n "INFO: starting "
while [ ! -f "${JBOSS_HOME}/logs/server.log" ]; do
sleep 1
echo -n "#"
done
echo -n "-log-"
while [ -z "$(cat ${JBOSS_HOME}/logs/server.log|grep "JBoss AS 7.1.1.Final \"Brontes\" started")" ]; do
sleep 1
echo -n "#"
done
echo -e "\nINFO: Jboss is running"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment