archwhite
4/17/2016 - 6:32 PM

Redmine update

Redmine update

redmine_url= $1
mv redmine redmine-old
wget $redmine_url
tar -xvzf redmine*tar.gz
mv `basename redmine*tar.gz .tar.gz` redmine
chown root:www-data redmine -R

cp redmine-old/config/configuration.yml redmine/config/configuration.yml
cp redmine-old/config/database.yml redmine/config/database.yml

cp -r redmine-old/files/ redmine/
cp -r redmine-old/plugins/ redmine/
cp -r redmine-old/public/themes/circle redmine/public/themes/
cd redmine
gem install bundler
gem install test-unit
bundle install --without development test rmagick

rm config/initializers/secret_token.rb
bundle exec rake generate_secret_token

bundle exec rake db:migrate RAILS_ENV=production
chown -R www-data:www-data files log tmp public/plugin_assets

bundle exec rake redmine:plugins:migrate RAILS_ENV=production
# rake db:migrate_plugins RAILS_ENV=production

chmod -R 755 files log/ tmp/ public/plugin_assets

bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production
#rake tmp:cache:clear
#rake tmp:sessions:clear

# cleaning
cd /var/www
rm redmine*tar.gz

service apache2 restart

# print info about redmine
./redmine/bin/about