1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/diaspora_ynh.git synced 2024-09-03 18:26:13 +02:00

Rework upgrade script: doing nothing atm

This commit is contained in:
Augustin Trancart 2020-04-19 15:28:43 +02:00
parent 2c99375752
commit bfe2164d85

View file

@ -1,20 +1,25 @@
#!/bin/sh #!/bin/bash
#=================================================
# GENERIC START
#=================================================
# IMPORT GENERIC HELPERS
#=================================================
# IMPORT GENERIC HELPERS
source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
app=$YNH_APP_INSTANCE_NAME
# Retrieve arguments # Retrieve arguments
domain=$(sudo yunohost app setting diaspora domain) domain=$(ynh_app_setting_get --app $app --key domain)
admin=$(sudo yunohost app setting diaspora admin) admin=$(ynh_app_setting_get --app $app --key admin)
final_path=$(sudo yunohost app setting diaspora final_path) final_path=$(ynh_app_setting_get --app $app --key final_path)
sudo service diaspora_ynh stop ynh_abort_if_errors
sleep 3
sudo cp ../conf/diaspora_ynh /etc/init.d/diaspora_ynh # nothing to do yet!!
sudo chmod 754 /etc/init.d/diaspora_ynh
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 start