diff --git a/scripts/upgrade b/scripts/upgrade index fe8df2b..9bc7acd 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -132,23 +132,25 @@ then ynh_store_file_checksum "/etc/nginx/conf.d/$domain.d/$app.conf" fi +#================================================= +# INSTALL ERLANG and ELIXIR +#================================================= +ynh_print_info "Installing erlang and elixir ..." + +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 + #================================================= # UPGRADE DEPENDENCIES #================================================= ynh_print_info "Upgrading 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 - # install dependencies ynh_install_app_dependencies git build-essential openssl ssh sudo postgresql postgresql-contrib elixir erlang-dev erlang-parsetools erlang-xmerl erlang-tools