From b4bdffe9d2b2f0aa0b6e50c3488b3b117ef778fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A9veloppeur=20=C3=A9gar=C3=A9?= Date: Sun, 1 Mar 2015 23:51:00 +0100 Subject: [PATCH] ajout script de maj a tester --- scripts/install | 2 +- scripts/upgrade | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 scripts/upgrade 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 +