diff --git a/scripts/install b/scripts/install index 568d699..33c9383 100644 --- a/scripts/install +++ b/scripts/install @@ -43,7 +43,7 @@ git clone -b master git://github.com/diaspora/diaspora.git sudo mkdir -p $final_path tar -cf source.tar.gz diaspora/ mv source.tar.gz diaspora/public/source.tar.gz -sudo cp -ar diaspora/* $final_path +sudo cp -ar diaspora $final_path/../. # Generate random password diff --git a/scripts/upgrade b/scripts/upgrade new file mode 100644 index 0000000..f1aece3 --- /dev/null +++ b/scripts/upgrade @@ -0,0 +1,15 @@ +#!/bin/bash + +# Retrieve arguments +domain=$(sudo yunohost app setting diaspora domain) +admin=$(sudo yunohost app setting diaspora admin) +final_path=$(sudo yunohost app setting diaspora final_path) + +sudo su - diaspora -c "rvm get stable" +sudo su - diaspora -c "git checkout Gemfile.lock db/schema.rb ; git pull" +sudo su - diaspora -c "bundle" +sudo su - diaspora -c "RAILS_ENV=production bundle exec rake db:migrate" +sudo su - diaspora -c "RAILS_ENV=production bundle exec rake tmp:cache:clear assets:precompile" + +sudo service diaspora_ynh restart +