Last active
December 14, 2015 06:09
-
-
Save jfro/5040378 to your computer and use it in GitHub Desktop.
Untested upgrade script for Redmine, hopefully can streamline upgrading an install.
This file contains 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
#!/bin/sh | |
VERSION=2.2.3 | |
URL=http://files.rubyforge.vm.bytemark.co.uk/redmine/redmine-$VERSION.tar.gz | |
SITES_DIR=/home/sites | |
SITE=example.com | |
cd $SITE_DIR | |
curl -O $URL | |
tar zxf redmine-$VERSION.tgz | |
rm redmine-$VERSION.tgz | |
OLD=$SITE_DIR/$SITE | |
NEW=$SITE_DIR/redmine-$VERSION | |
# copy configuration, files, & plugins to new install | |
cp $OLD/config/database.yml $NEW/config/ | |
cp $OLD/config/configuration.yml $NEW/config/ | |
cp -R $OLD/files/* $NEW/files/ | |
cp -R $OLD/plugins/* $NEW/plugins/ | |
cd $NEW | |
mkdir public/plugin_assets | |
bundle install --without development test mysql | |
rake generate_secret_token | |
rake db:migrate RAILS_ENV=production | |
rake redmine:plugins:migrate RAILS_ENV=production | |
rake tmp:cache:clear | |
rake tmp:sessions:clear | |
mv $OLD ${OLD}_bak | |
mv $NEW $OLD | |
touch $OLD/tmp/restart.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment