zammad: Führe Ruby-Aktualisierung und Translations-Sync im Update-Skript aus.
This commit is contained in:
parent
f78c543430
commit
4fe0830924
1 changed files with 16 additions and 0 deletions
|
@ -1,7 +1,11 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
RUBY_VERSION=$(cat {{ zammad_home }}/.ruby-version)
|
||||||
|
RUBY_INSTALLED_VERSIONS=$(rbenv version | grep $RUBY_VERSION | cut -d ' ' -f2)
|
||||||
|
|
||||||
echo "Stoppe Monit-Monitoring..."
|
echo "Stoppe Monit-Monitoring..."
|
||||||
monit unmonitor zammad-websocket
|
monit unmonitor zammad-websocket
|
||||||
monit unmonitor zammad-rails
|
monit unmonitor zammad-rails
|
||||||
|
@ -16,6 +20,14 @@ sudo -u {{ zammad_user }} RAILS_ENV=production rbenv exec rails r "Cache.clear"
|
||||||
echo "Aktualisiere Git-Repository..."
|
echo "Aktualisiere Git-Repository..."
|
||||||
git pull
|
git pull
|
||||||
|
|
||||||
|
if [ -n "$RUBY_INSTALLED_VERSIONS" ]; then
|
||||||
|
echo "Aktualisiere Ruby-Version..."
|
||||||
|
sudo -u {{ zammad_user }} rbenv install "$RUBY_VERSION"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Aktualisiere bundler..."
|
||||||
|
sudo -u {{ zammad_user }} RAILS_ENV=production rbenv exec gem install bundler
|
||||||
|
|
||||||
echo "Aktualisiere Ruby-Pakete..."
|
echo "Aktualisiere Ruby-Pakete..."
|
||||||
sudo -u {{ zammad_user }} RAILS_ENV=production rbenv exec bundle install --without test development mysql
|
sudo -u {{ zammad_user }} RAILS_ENV=production rbenv exec bundle install --without test development mysql
|
||||||
|
|
||||||
|
@ -28,6 +40,10 @@ sudo -u {{ zammad_user }} RAILS_ENV=production rbenv exec bundle exec rake db:mi
|
||||||
echo "Assets vorkompilieren..."
|
echo "Assets vorkompilieren..."
|
||||||
sudo -u {{ zammad_user }} RAILS_ENV=production rbenv exec bundle exec rake assets:precompile
|
sudo -u {{ zammad_user }} RAILS_ENV=production rbenv exec bundle exec rake assets:precompile
|
||||||
|
|
||||||
|
echo "Synchronisiere Translation-Dateien..."
|
||||||
|
sudo -u {{ zammad_user }} RAILS_ENV=production rbenv exec rails r "Locale.sync"
|
||||||
|
sudo -u {{ zammad_user }} RAILS_ENV=production rbenv exec rails r "Translation.sync"
|
||||||
|
|
||||||
echo "Starte Zammad..."
|
echo "Starte Zammad..."
|
||||||
systemctl start zammad.service
|
systemctl start zammad.service
|
||||||
sleep 20
|
sleep 20
|
||||||
|
|
Loading…
Reference in a new issue