diff options
| -rw-r--r-- | scripts/install | 2 | ||||
| -rw-r--r-- | scripts/restore | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/scripts/install b/scripts/install index b36c8f2..ba8d7c0 100644 --- a/scripts/install +++ b/scripts/install @@ -82,7 +82,7 @@ sudo su -c "psql" postgres <<< \ ynh_psql_create_db_without_password "$app" sudo systemctl restart postgresql -# Download all Ruby source +# Download all sources rbenv, ruby and mastodon sudo su - $app <<CLONECOMMANDS git clone https://github.com/rbenv/rbenv.git $final_path/.rbenv git clone https://github.com/rbenv/ruby-build.git $final_path/.rbenv/plugins/ruby-build diff --git a/scripts/restore b/scripts/restore index 70b876b..965f6f0 100644 --- a/scripts/restore +++ b/scripts/restore @@ -70,6 +70,8 @@ sudo cp -a ./sources/. "$final_path" # Set permissions sudo chown -R $app: "$final_path" +sudo chmod -R a+rx /home/yunohost.backup/tmp + sudo ls -alh "$final_path" @@ -102,7 +104,7 @@ RAILS_ENV=production bin/bundle exec rails assets:precompile RCOMMANDS # restore database -sudo pg_dump mastodon_production < $YNH_APP_BACKUP_DIR/mastodon_db.sql +sudo psql mastodon_production < $YNH_APP_BACKUP_DIR/mastodon_db.sql # Create symlink for ruby sudo ln -s /opt/mastodon/.rbenv/versions/2.4.1/bin/ruby /usr/bin/ruby || true @@ -131,4 +133,4 @@ sudo yunohost service add mastodon-sidekiq sudo yunohost service add mastodon-streaming # Reload services -sudo systemctl reload nginx
\ No newline at end of file +sudo systemctl reload nginx |
