From 758f8fc1187eb7699a9c67028fee090de11332db Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 25 Mar 2019 17:27:08 +0100 Subject: [PATCH] fix extra repo --- scripts/install | 8 ++++++-- scripts/remove | 1 + scripts/restore | 12 ++++++------ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/scripts/install b/scripts/install index cffefaa..ac50dbe 100755 --- a/scripts/install +++ b/scripts/install @@ -91,10 +91,14 @@ ynh_app_setting_set $app port $port #================================================= ynh_print_info "Adding Erlang repository..." +wget https://packages.erlang-solutions.com/debian/erlang_solutions.asc +apt-key add erlang_solutions.asc +rm erlang_solutions.asc + if [ "$(lsb_release --codename --short)" == "jessie" ]; then - ynh_install_extra_repo --repo="deb http://packages.erlang-solutions.com/debian jessie contrib" --key="https://packages.erlang-solutions.com/debian/dists/jessie/Release.gpg" + ynh_install_extra_repo --repo="deb http://packages.erlang-solutions.com/debian jessie contrib" elif [ "$(lsb_release --codename --short)" == "stretch" ]; then - ynh_install_extra_repo --repo="deb http://packages.erlang-solutions.com/debian stretch contrib" --key="https://packages.erlang-solutions.com/debian/dists/stretch/Release.gpg" + ynh_install_extra_repo --repo="deb http://packages.erlang-solutions.com/debian stretch contrib" fi #================================================= diff --git a/scripts/remove b/scripts/remove index 30ac277..2de13fc 100755 --- a/scripts/remove +++ b/scripts/remove @@ -76,6 +76,7 @@ ynh_remove_app_dependencies ynh_print_info "Removing erlang repository..." ynh_remove_extra_repo +apt-key del A14F4FCA #================================================= # REMOVE APP MAIN DIR diff --git a/scripts/restore b/scripts/restore index c9bb64d..726bbc3 100755 --- a/scripts/restore +++ b/scripts/restore @@ -88,15 +88,15 @@ chown -R "$app":"$app" "$final_path" #================================================= ynh_print_info "Adding Erlang repository..." +wget https://packages.erlang-solutions.com/debian/erlang_solutions.asc +apt-key add erlang_solutions.asc +rm erlang_solutions.asc + if [ "$(lsb_release --codename --short)" == "jessie" ]; then - echo "deb http://packages.erlang-solutions.com/debian jessie contrib" | tee /etc/apt/sources.list.d/erlang-solutions.list + ynh_install_extra_repo --repo="deb http://packages.erlang-solutions.com/debian jessie contrib" elif [ "$(lsb_release --codename --short)" == "stretch" ]; then - echo "deb http://packages.erlang-solutions.com/debian stretch contrib" | tee /etc/apt/sources.list.d/erlang-solutions.list + ynh_install_extra_repo --repo="deb http://packages.erlang-solutions.com/debian stretch contrib" fi -sudo wget https://packages.erlang-solutions.com/debian/erlang_solutions.asc -sudo apt-key add erlang_solutions.asc -sudo rm erlang_solutions.asc -apt update #================================================= # REINSTALL DEPENDENCIES