From d592fe5cac9722ab931960bf9e95785d1e55f083 Mon Sep 17 00:00:00 2001 From: nemsia Date: Thu, 14 Jun 2018 15:19:48 +0200 Subject: [PATCH] Remove backports and yarn repo files --- conf/backports.list | 1 - conf/yarn.list | 1 - scripts/backup | 4 +--- scripts/install | 4 ++-- scripts/remove | 1 + scripts/restore | 4 ++-- scripts/upgrade | 8 ++++++++ 7 files changed, 14 insertions(+), 9 deletions(-) delete mode 100644 conf/backports.list delete mode 100644 conf/yarn.list diff --git a/conf/backports.list b/conf/backports.list deleted file mode 100644 index b8c3f51..0000000 --- a/conf/backports.list +++ /dev/null @@ -1 +0,0 @@ -deb http://httpredir.debian.org/debian jessie-backports main \ No newline at end of file diff --git a/conf/yarn.list b/conf/yarn.list deleted file mode 100644 index 842ebb9..0000000 --- a/conf/yarn.list +++ /dev/null @@ -1 +0,0 @@ -deb https://dl.yarnpkg.com/debian/ stable main \ No newline at end of file diff --git a/scripts/backup b/scripts/backup index f32dfdd..be3b0a4 100644 --- a/scripts/backup +++ b/scripts/backup @@ -72,7 +72,5 @@ ynh_backup "/etc/systemd/system/$app-streaming.service" #================================================= # BACKUP THE sources.list FILES #================================================= -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 22abeff..3d4d458 100644 --- a/scripts/install +++ b/scripts/install @@ -81,10 +81,10 @@ fi # Install source.list debian package backports & yarn if [ "$(lsb_release --codename --short)" == "jessie" ]; then -sudo cp ../conf/backports.list /etc/apt/sources.list.d/ + echo "deb http://httpredir.debian.org/debian jessie-backports main" | tee /etc/apt/sources.list.d/jessie-backports.list fi curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - -cp ../conf/yarn.list /etc/apt/sources.list.d/ +echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list ynh_package_update # Creates the destination directory and stores its location. diff --git a/scripts/remove b/scripts/remove index 470455e..0ea12df 100644 --- a/scripts/remove +++ b/scripts/remove @@ -103,6 +103,7 @@ ynh_secure_remove /etc/cron.d/$app #================================================= if [ "$(lsb_release --codename --short)" == "jessie" ]; then ynh_secure_remove /etc/apt/sources.list.d/backports.list + ynh_secure_remove /etc/apt/sources.list.d/jessie-backports.list fi ynh_secure_remove /etc/apt/sources.list.d/yarn.list diff --git a/scripts/restore b/scripts/restore index 785d057..a8dc79f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -89,10 +89,10 @@ fi # Install source.list debian package backports & yarn if [ "$(lsb_release --codename --short)" == "jessie" ]; then - cp ./apt_backports.list /etc/apt/sources.list.d/backports.list + echo "deb http://httpredir.debian.org/debian jessie-backports main" | tee /etc/apt/sources.list.d/jessie-backports.list fi curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - -cp ./apt_yarn.list /etc/apt/sources.list.d/yarn.list +echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list ynh_package_update # Install de Node.js diff --git a/scripts/upgrade b/scripts/upgrade index d50b729..a0ca482 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -47,6 +47,14 @@ if [[ "$admin" = "" || "$language" = "" ]]; then ynh_die fi +if [ "$(lsb_release --codename --short)" == "jessie" ]; then + echo "deb http://httpredir.debian.org/debian jessie-backports main" | tee /etc/apt/sources.list.d/jessie-backports.list + ynh_secure_remove /etc/apt/sources.list.d/backports.list +fi + +# Add yarn repo +echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #=================================================