deactivated set -e for db check
This commit is contained in:
parent
6d49d009ae
commit
9aa8a7540d
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [ "$1" = 'zammad-backup' ]; then
|
if [ "$1" = 'zammad-backup' ]; then
|
||||||
# wait for zammad process coming up
|
# wait for zammad process coming up
|
||||||
until (echo > /dev/tcp/zammad-railsserver/3000) &> /dev/null; do
|
until (echo > /dev/tcp/zammad-railsserver/3000) &> /dev/null; do
|
||||||
|
@ -21,15 +21,19 @@ if [ "$1" = 'zammad-railsserver' ]; then
|
|||||||
bundle install
|
bundle install
|
||||||
|
|
||||||
# db mirgrate
|
# db mirgrate
|
||||||
|
set +e
|
||||||
bundle exec rake db:migrate &> /dev/null
|
bundle exec rake db:migrate &> /dev/null
|
||||||
|
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "creating db & searchindex..."
|
echo "creating db & searchindex..."
|
||||||
|
set -e
|
||||||
bundle exec rake db:create
|
bundle exec rake db:create
|
||||||
bundle exec rake db:migrate
|
bundle exec rake db:migrate
|
||||||
bundle exec rake db:seed
|
bundle exec rake db:seed
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# es config
|
# es config
|
||||||
bundle exec rails r "Setting.set('es_url', 'http://zammad-elasticsearch:9200')"
|
bundle exec rails r "Setting.set('es_url', 'http://zammad-elasticsearch:9200')"
|
||||||
bundle exec rake searchindex:rebuild
|
bundle exec rake searchindex:rebuild
|
||||||
|
Loading…
Reference in New Issue
Block a user