Skip to content

Instantly share code, notes, and snippets.

@fernandoabcampos
Created July 18, 2014 12:46
Show Gist options
  • Select an option

  • Save fernandoabcampos/4fb96827170223793b22 to your computer and use it in GitHub Desktop.

Select an option

Save fernandoabcampos/4fb96827170223793b22 to your computer and use it in GitHub Desktop.

Revisions

  1. fernandoabcampos created this gist Jul 18, 2014.
    22 changes: 22 additions & 0 deletions atualizar-oap-search-api
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    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