diff --git a/scripts/install b/scripts/install index 60d6a73..e7bdb38 100755 --- a/scripts/install +++ b/scripts/install @@ -90,14 +90,14 @@ ynh_app_setting_set $app port $port #================================================= ynh_print_info "Adding Erlang repository..." +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 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/$app.list -elif [ "$(lsb_release --codename --short)" == "stretch" ]; then - echo "deb http://packages.erlang-solutions.com/debian stretch contrib" | tee /etc/apt/sources.list.d/$app.list -fi ynh_package_update #================================================= diff --git a/scripts/remove b/scripts/remove index cf83f1d..0926a6a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -74,7 +74,7 @@ ynh_remove_app_dependencies #================================================= ynh_print_info "Removing erlang repository..." -ynh_secure_remove "/etc/apt/sources.list.d/$app.list" +ynh_secure_remove "/etc/apt/sources.list.d/erlang-solutions.list" apt-key del A14F4FCA #================================================= diff --git a/scripts/restore b/scripts/restore index 0b9ba3e..7188101 100755 --- a/scripts/restore +++ b/scripts/restore @@ -87,14 +87,14 @@ chown -R "$app":"$app" "$final_path" #================================================= ynh_print_info "Adding Erlang repository..." +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 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/$app.list -elif [ "$(lsb_release --codename --short)" == "stretch" ]; then - echo "deb http://packages.erlang-solutions.com/debian stretch contrib" | tee /etc/apt/sources.list.d/$app.list -fi ynh_package_update #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index e85410b..3659d2a 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -147,14 +147,14 @@ fi #================================================= ynh_print_info "Adding Erlang repository..." +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 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/$app.list -elif [ "$(lsb_release --codename --short)" == "stretch" ]; then - echo "deb http://packages.erlang-solutions.com/debian stretch contrib" | tee /etc/apt/sources.list.d/$app.list -fi ynh_package_update #================================================= # UPGRADE DEPENDENCIES