Last active
August 29, 2015 14:04
-
-
Save fernandoabcampos/fe8f31f89215736bcc0b to your computer and use it in GitHub Desktop.
Shell
This file contains hidden or 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
sudo su - | |
cp -rfv /appdata/jboss/current/server/default/deploy/oap-search-api*.war /appdata/jboss/current/server/default/backup/ | |
service jboss stop | |
sleep 10 | |
mv -v /tmp/oap-search-api-tmp/* /appdata/jboss/current/server/default/deploy/ | |
service jboss start | |
wait_until_started() { | |
echo Aguardando o servidor ser iniciado. | |
regex='Server startup' | |
tail /appdata/log/jboss/server.log -n0 -F | while read line; do | |
if [[ $line =~ $regex ]]; then | |
pkill -9 -P $$ tail | |
fi | |
done | |
echo Servidor iniciado com sucesso | |
} | |
wait_until_started | |
exit | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment