mirror of
https://github.com/YunoHost-Apps/diaspora_ynh.git
synced 2024-09-03 18:26:13 +02:00
sudo su - diaspora
This commit is contained in:
parent
f158650c68
commit
ee5a0afc14
1 changed files with 7 additions and 18 deletions
|
@ -57,7 +57,6 @@ sed -i "s@DBUSERTOCHANGE@$db_user@g" ../conf/database.yml
|
||||||
sed -i "s@DBPASSTOCHANGE@$db_user@g" ../conf/database.yml
|
sed -i "s@DBPASSTOCHANGE@$db_user@g" ../conf/database.yml
|
||||||
sudo cp ../conf/diaspora.yml $final_path/config/
|
sudo cp ../conf/diaspora.yml $final_path/config/
|
||||||
sudo cp ../conf/database.yml $final_path/config/
|
sudo cp ../conf/database.yml $final_path/config/
|
||||||
sudo chown -R diaspora:diaspora $final_path
|
|
||||||
|
|
||||||
# install startup script
|
# install startup script
|
||||||
sudo cp ../conf/diaspora_ynh /etc/init.d/diaspora_ynh
|
sudo cp ../conf/diaspora_ynh /etc/init.d/diaspora_ynh
|
||||||
|
@ -68,29 +67,19 @@ sudo update-rc.d diaspora_ynh defaults
|
||||||
#sudo adduser --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --quiet --disabled-login -d $final_path diaspora
|
#sudo adduser --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --quiet --disabled-login -d $final_path diaspora
|
||||||
sudo useradd -d $final_path diaspora
|
sudo useradd -d $final_path diaspora
|
||||||
sudo chown -R diaspora:diaspora $final_path
|
sudo chown -R diaspora:diaspora $final_path
|
||||||
sudo su diaspora
|
|
||||||
cd ~
|
sudo su - diaspora -c "echo '[[ -s \"$HOME/.rvm/scripts/rvm\" ]] && source \"$HOME/.rvm/scripts/rvm\"' >> ~/.bashrc"
|
||||||
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
|
|
||||||
|
|
||||||
# Config RVM
|
# Config RVM
|
||||||
curl -sSL https://rvm.io/mpapis.asc | gpg --import -
|
sudo su - diaspora -c "curl -sSL https://rvm.io/mpapis.asc | gpg --import - ; curl -L dspr.tk/1t | bash ; rvm install 2.0"
|
||||||
curl -L dspr.tk/1t | bash
|
|
||||||
. ~/.bashrc
|
|
||||||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
|
||||||
rvm install 2.0
|
|
||||||
|
|
||||||
cd $final_path
|
|
||||||
|
|
||||||
# force get app deps (for debug)
|
# force get app deps (for debug)
|
||||||
gem install nokogiri -v '1.6.1'
|
sudo su - diaspora -c "cd $final_path; gem install nokogiri -v '1.6.1'; gem install raindrops -v '0.13.0'"
|
||||||
gem install raindrops -v '0.13.0'
|
|
||||||
|
|
||||||
# construct diaspora app
|
# construct diaspora app
|
||||||
RAILS_ENV=production bundle install --without test development
|
sudo su - diaspora -c "cd $final_path; RAILS_ENV=production bundle install --without test development"
|
||||||
RAILS_ENV=production bundle exec rake db:create db:schema:load
|
sudo su - diaspora -c "cd $final_path; RAILS_ENV=production bundle exec rake db:create db:schema:load"
|
||||||
RAILS_ENV=production bundle exec rake assets:precompile
|
sudo su - diaspora -c "cd $final_path; RAILS_ENV=production bundle exec rake assets:precompile"
|
||||||
|
|
||||||
exit
|
|
||||||
|
|
||||||
cd $ori_path
|
cd $ori_path
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue