From 1ba6dd814d4cd9a26b1075f8e050b3478b503700 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sun, 24 Feb 2019 12:46:07 +0100 Subject: [PATCH] Remove repository references --- scripts/install | 33 ++++++++++++++++++++++++--------- scripts/remove | 8 +++++++- scripts/upgrade | 3 +++ 3 files changed, 34 insertions(+), 10 deletions(-) diff --git a/scripts/install b/scripts/install index 24cf001..3c2226a 100755 --- a/scripts/install +++ b/scripts/install @@ -106,6 +106,21 @@ port=$(ynh_find_port 8095) #ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $port ynh_app_setting_set $app port $port +#================================================= +# INSTALL ERLANG 1.21.2.6-1 +#================================================= +ynh_print_info "Installing erlang 1.21.2.6-1..." + +if [ "$(lsb_release --codename --short)" == "jessie" ]; then + #sudo apt install -y ../sources/esl-erlang_21.2.6-1~debian~jessie_amd64.deb + #sudo apt install -y ../sources/elixir_1.8.1-2~debian~jessie_amd64.deb +elif + [ "$(lsb_release --codename --short)" == "stretch" ]; then + #sudo apt install -y ../sources/esl-erlang_21.2.6-1~debian~stretch_amd64.deb + #sudo apt install -y ../sources/elixir_1.8.1-2~debian~stretch_amd64.deb +fi + + #================================================= # INSTALL DEPENDENCIES #================================================= @@ -120,15 +135,15 @@ ynh_print_info "Installing dependencies ..." # Add erlang for Debian Jessie -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 -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 -fi -sudo wget https://packages.erlang-solutions.com/debian/erlang_solutions.asc -sudo apt-key add erlang_solutions.asc -sudo 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 +#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 +#fi +#sudo wget https://packages.erlang-solutions.com/debian/erlang_solutions.asc +#sudo apt-key add erlang_solutions.asc +#sudo rm erlang_solutions.asc # install dependencies ynh_install_app_dependencies git build-essential openssl ssh sudo postgresql postgresql-contrib elixir erlang-dev erlang-parsetools erlang-xmerl erlang-tools diff --git a/scripts/remove b/scripts/remove index 6b280b1..ddbee98 100755 --- a/scripts/remove +++ b/scripts/remove @@ -68,7 +68,13 @@ ynh_print_info "Removing dependencies" # Remove metapackage and its dependencies ynh_remove_app_dependencies -ynh_secure_remove "/etc/apt/sources.list.d/erlang-solutions.list" + +#================================================= +# REMOVE ERLANG 1.21.2.6-1 +#================================================= +ynh_print_info "Removing erlang 1.21.2.6-1..." + +#sudo apt remove -y esl-erlang #================================================= # REMOVE APP MAIN DIR diff --git a/scripts/upgrade b/scripts/upgrade index a625d2d..8b74dde 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -70,6 +70,9 @@ if [ -z $final_path ]; then ynh_app_setting_set $app final_path $final_path fi +# Remove repository +ynh_secure_remove "/etc/apt/sources.list.d/erlang-solutions.list" + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #=================================================