diff --git a/conf/app-mastodon.src b/conf/app-mastodon.src index 7f6864b..84b72fb 100644 --- a/conf/app-mastodon.src +++ b/conf/app-mastodon.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.0rc3.tar.gz -SOURCE_SUM=7e3a9ede97b15d4e3daf09bcc97bc00de7a88fd6d7fdc37dd124fa77b27c7d76 +SOURCE_URL=https://github.com/tootsuite/mastodon/archive/v2.4.0.tar.gz +SOURCE_SUM=3d4904f30c28591333b1cf4c03173849dd6983ab00685f61e50e594160c672ee SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/conf/crontab_mastodon b/conf/crontab_mastodon deleted file mode 100644 index 62caff0..0000000 --- a/conf/crontab_mastodon +++ /dev/null @@ -1,7 +0,0 @@ -@daily __APP__ cd /opt/__APP__/live && RAILS_ENV=production /opt/__APP__/.rbenv/shims/bundle exec rake mastodon:media:clear - -@daily __APP__ cd /opt/__APP__/live && RAILS_ENV=production /opt/__APP__/.rbenv/shims/bundle exec rake mastodon:push:refresh - -@daily __APP__ cd /opt/__APP__/live && RAILS_ENV=production /opt/__APP__/.rbenv/shims/bundle exec rake mastodon:feeds:clear - -@daily __APP__ cd /opt/__APP__/live && RAILS_ENV=production /opt/__APP__/.rbenv/shims/bundle exec rake mastodon:users:clear diff --git a/scripts/backup b/scripts/backup index 5e134ac..ab231b3 100644 --- a/scripts/backup +++ b/scripts/backup @@ -75,6 +75,7 @@ ynh_backup "/etc/cron.d/$app" #================================================= # BACKUP THE sources.list FILES #================================================= - -ynh_backup "/etc/apt/sources.list.d/backports.list" "apt_backports.list" +if [ "$(lsb_release --codename --short)" == "jessie" ]; then + ynh_backup "/etc/apt/sources.list.d/backports.list" "apt_backports.list" +fi ynh_backup "/etc/apt/sources.list.d/yarn.list" "apt_yarn.list" diff --git a/scripts/install b/scripts/install index 81ce213..8058671 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 @@ -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 <> .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 ) diff --git a/scripts/remove b/scripts/remove index 0c39054..e939908 100644 --- a/scripts/remove +++ b/scripts/remove @@ -98,12 +98,13 @@ ynh_secure_remove /etc/cron.d/$app #================================================= # REMOVE source.list #================================================= - -ynh_secure_remove /etc/apt/sources.list.d/backports.list +if [ "$(lsb_release --codename --short)" == "jessie" ]; then + ynh_secure_remove /etc/apt/sources.list.d/backports.list +fi ynh_secure_remove /etc/apt/sources.list.d/yarn.list # Delete ruby exec -ynh_secure_remove /usr/bin/ruby +#ynh_secure_remove /usr/bin/ruby #================================================= # GENERIC FINALIZATION diff --git a/scripts/restore b/scripts/restore index b9798a7..77cb229 100644 --- a/scripts/restore +++ b/scripts/restore @@ -88,7 +88,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 + 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 diff --git a/scripts/upgrade b/scripts/upgrade index 3d5dcd3..c151b57 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -130,7 +130,11 @@ ln -s $final_path/.rbenv/versions/2.5.1/bin/ruby /usr/bin/ruby || true sudo su - $app <