diff options
| author | nemsia <nemsia@nemsia.org> | 2018-06-07 17:15:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-07 17:15:08 +0200 |
| commit | c38df0dc27195a3ee4614e8f5f78ebde297b1bfb (patch) | |
| tree | e1ba9ca80791626f98bd2655d4631707255e2bcb /scripts | |
| parent | 301df81c1e34e541e3dd6fcba5037d5744646747 (diff) | |
| download | mastodon_ynh-c38df0dc27195a3ee4614e8f5f78ebde297b1bfb.tar.gz mastodon_ynh-c38df0dc27195a3ee4614e8f5f78ebde297b1bfb.tar.bz2 mastodon_ynh-c38df0dc27195a3ee4614e8f5f78ebde297b1bfb.zip | |
Fix migrated stretch (#23)
* Force bundle re-install
* Add check debian on upgrade and clean check
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/backup | 3 | ||||
| -rw-r--r-- | scripts/install | 3 | ||||
| -rw-r--r-- | scripts/restore | 3 | ||||
| -rw-r--r-- | scripts/upgrade | 6 |
4 files changed, 8 insertions, 7 deletions
diff --git a/scripts/backup b/scripts/backup index b7ff222..8040747 100644 --- a/scripts/backup +++ b/scripts/backup @@ -32,8 +32,7 @@ ynh_backup "/etc/cron.d/${app}" "cron.conf" ynh_backup "/etc/systemd/system/mastodon-web.service" "systemd_web.service" ynh_backup "/etc/systemd/system/mastodon-sidekiq.service" "systemd_sidekiq.service" ynh_backup "/etc/systemd/system/mastodon-streaming.service" "systemd_streaming.service" -debian_version=$(lsb_release -c -s) -if [[ $debian_version = jessie ]]; then +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 d92e0ed..03f91bd 100644 --- a/scripts/install +++ b/scripts/install @@ -64,8 +64,7 @@ sudo curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - sudo cp ../conf/yarn.list /etc/apt/sources.list.d/ # Install source.list debian jessie package backports -debian_version=$(lsb_release -c -s) -if [[ $debian_version = jessie ]]; then +if [ "$(lsb_release --codename --short)" == "jessie" ]; then sudo cp ../conf/backports.list /etc/apt/sources.list.d/ ynh_package_update sudo apt-get -t jessie-backports -y install ffmpeg diff --git a/scripts/restore b/scripts/restore index c6031de..1eb67e8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -90,8 +90,7 @@ sudo adduser $app --home /opt/$app --gecos "First Last,RoomNumber,WorkPhone,Home sudo cp ./apt_yarn.list /etc/apt/sources.list.d/yarn.list # Install source.list debian jessie package backports - debian_version=$(lsb_release -c -s) - if [[ $debian_version = jessie ]]; then + if [ "$(lsb_release --codename --short)" == "jessie" ]; then sudo cp ./apt_backports.list /etc/apt/sources.list.d/backports.list ynh_package_update sudo apt-get -t jessie-backports -y install ffmpeg diff --git a/scripts/upgrade b/scripts/upgrade index 6035d48..937b5ea 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -83,7 +83,11 @@ sudo ln -s $final_path/.rbenv/versions/2.5.1/bin/ruby /usr/bin/ruby || true sudo su - $app <<MCOMMANDS pushd ~/live $final_path/.rbenv/versions/2.5.1/bin/gem install bundler -$final_path/.rbenv/versions/2.5.1/bin/bundle install --deployment --without development test +if [ "$(lsb_release --codename --short)" == "jessie" ]; then + $final_path/.rbenv/versions/2.5.1/bin/bundle install --deployment --without development test +else + $final_path/.rbenv/versions/2.5.1/bin/bundle install --deployment --force --without development test +fi MCOMMANDS pushd $final_path/live |
