aboutsummaryrefslogtreecommitdiff
path: root/scripts/install
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/install')
-rw-r--r--scripts/install29
1 files changed, 13 insertions, 16 deletions
diff --git a/scripts/install b/scripts/install
index 8e505e7..cbce4e3 100644
--- a/scripts/install
+++ b/scripts/install
@@ -80,7 +80,9 @@ if [[ "$arch" = arm* ]]; then
fi
# Install source.list debian package backports & yarn
-cp ../conf/backports.list /etc/apt/sources.list.d/
+if [ "$(lsb_release --codename --short)" == "jessie" ]; then
+sudo cp ../conf/backports.list /etc/apt/sources.list.d/
+fi
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
cp ../conf/yarn.list /etc/apt/sources.list.d/
ynh_package_update
@@ -170,14 +172,14 @@ eval \"\$(rbenv init -)\"" > $final_path/.profile
# Install ruby-build
(
- exec_as "$app" $final_path/.rbenv/bin/rbenv install 2.5.0
- exec_as "$app" $final_path/.rbenv/bin/rbenv global 2.5.0
- exec_as "$app" $final_path/.rbenv/versions/2.5.0/bin/ruby -v
+ exec_as "$app" $final_path/.rbenv/bin/rbenv install 2.5.1
+ exec_as "$app" $final_path/.rbenv/bin/rbenv global 2.5.1
+ exec_as "$app" $final_path/.rbenv/versions/2.5.1/bin/ruby -v
)
# Create symlink for ruby
rm /usr/bin/ruby || true
-ln -s $final_path/.rbenv/versions/2.5.0/bin/ruby /usr/bin/ruby || true
+ln -s $final_path/.rbenv/versions/2.5.1/bin/ruby /usr/bin/ruby || true
# Adjust Mastodon config
# TODO: use official helper ynh_replace_string
@@ -214,13 +216,12 @@ sed -i "s@#SMTP_OPENSSL_VERIFY_MODE=peer@SMTP_OPENSSL_VERIFY_MODE=none@g" "${fin
(
cd "$final_path/live"
su mastodon <<INSTALL
-$final_path/.rbenv/versions/2.5.0/bin/gem install bundler
-$final_path/live/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test --quiet
-yarn install --production --no-progress --non-interactive --silent
-
-echo "SAFETY_ASSURED=1">> .env.production
-RAILS_ENV=production $final_path/live/bin/bundle exec rails db:migrate --quiet
-RAILS_ENV=production $final_path/live/bin/bundle exec rails assets:precompile --quiet
+ $final_path/.rbenv/versions/2.5.1/bin/gem install bundler
+ $final_path/live/bin/bundle install -j$(getconf _NPROCESSORS_ONLN) --deployment --without development test --quiet
+ yarn install --production --no-progress --non-interactive --silent
+ echo "SAFETY_ASSURED=1">> .env.production
+ RAILS_ENV=production $final_path/live/bin/bundle exec rails db:migrate --quiet
+ RAILS_ENV=production $final_path/live/bin/bundle exec rails assets:precompile --quiet
INSTALL
)
@@ -246,10 +247,6 @@ RAILS_ENV=production bin/bundle exec rails mastodon:confirm_email USER_EMAIL=$ad
SETADMIN
)
-# Install crontab
-cp ../conf/crontab_mastodon /etc/cron.d/$app
-sed -i "s@__APP__@$app@g" /etc/cron.d/$app
-
#=================================================
# GENERIC FINALIZATION
#=================================================