diff options
Diffstat (limited to 'scripts/install')
| -rw-r--r-- | scripts/install | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/scripts/install b/scripts/install index 012d558..dba714e 100644 --- a/scripts/install +++ b/scripts/install @@ -63,15 +63,30 @@ ynh_app_setting_set $app final_path $final_path pushd /opt curl -sL https://deb.nodesource.com/setup_4.x | sudo bash - sudo apt-get -y install nodejs -npm install -g yarn +sudo npm install -g yarn +<<<<<<< HEAD +# Set UTF8 encoding by default +sudo su -c "psql" postgres <<< \ + "update pg_database set datistemplate='false' where datname='template1';"\ + "drop database template1;"\ + "create database template1 encoding='UTF8' template template0;"\ + "update pg_database set datistemplate='true' where datname='template1';" + +# Create DB user mastodon +======= # Create DB without password sudo systemctl restart postgresql +>>>>>>> refs/remotes/magikcypress/master ynh_psql_create_db_without_password "$app" # Download all Ruby source sudo git clone https://github.com/rbenv/rbenv.git $final_path/.rbenv sudo git clone https://github.com/rbenv/ruby-build.git $final_path/.rbenv/plugins/ruby-build +<<<<<<< HEAD +sudo git clone https://github.com/tootsuite/mastodon.git $final_path/live + +======= # Be king rewind (/var/cache/yunohost/from_file/scripts) popd @@ -79,6 +94,7 @@ popd # Get Mastodon last version sudo mkdir "${final_path}/live" SETUP_SOURCE +>>>>>>> refs/remotes/magikcypress/master sudo chown -R $app: "${final_path}" # Install de rbenv @@ -92,17 +108,17 @@ COMMANDS # Install ruby-build sudo su - $app <<RCOMMANDS -/opt/mastodon/.rbenv/bin/rbenv install 2.3.1 -/opt/mastodon/.rbenv/versions/2.3.1/bin/ruby -v +/opt/mastodon/.rbenv/bin/rbenv install 2.4.1 +/opt/mastodon/.rbenv/versions/2.4.1/bin/ruby -v RCOMMANDS # Create symlink for ruby -sudo ln -s /opt/mastodon/.rbenv/versions/2.3.1/bin/ruby /usr/bin/ruby || true +sudo ln -s /opt/mastodon/.rbenv/versions/2.4.1/bin/ruby /usr/bin/ruby || true # Install Mastodon sudo su - $app <<MCOMMANDS pushd ~/live -/opt/mastodon/.rbenv/versions/2.3.1/bin/gem install bundler +/opt/mastodon/.rbenv/versions/2.4.1/bin/gem install bundler bin/bundle install --deployment --without development test yarn install MCOMMANDS @@ -148,7 +164,7 @@ pushd ~/live ACOMMANDS # Add Services -pushd /var/cache/yunohost/from_file/scripts +pushd /var/cache/yunohost/from_file/mastodon_ynh-master/scripts sudo cp ../conf/mastodon-web.service /etc/systemd/system/mastodon-web.service sudo chown root: /etc/systemd/system/mastodon-web.service @@ -156,7 +172,7 @@ sudo cp ../conf/mastodon-sidekiq.service /etc/systemd/system/mastodon-sidekiq.se sudo chown root: /etc/systemd/system/mastodon-sidekiq.service sudo cp ../conf/mastodon-streaming.service /etc/systemd/system/mastodon-streaming.service sudo chown root: /etc/systemd/system/mastodon-streaming.service - +sudo systemctl daemon-reload sudo systemctl enable /etc/systemd/system/mastodon-*.service # sudo systemctl start mastodon-web.service mastodon-sidekiq.service mastodon-streaming.service # # debug @@ -193,4 +209,10 @@ fi sudo yunohost app ssowatconf # Reload Nginx -sudo systemctl reload nginx
\ No newline at end of file +<<<<<<< HEAD +sudo systemctl reload nginx || true +# debug +sudo systemctl status nginx +======= +sudo systemctl reload nginx +>>>>>>> refs/remotes/magikcypress/master |
