1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pleroma_ynh.git synced 2024-09-03 20:15:59 +02:00

Merge pull request #41 from YunoHost-Apps/remove_repository

Remove repository
This commit is contained in:
yalh76 2019-02-24 14:59:00 +01:00 committed by GitHub
commit 9bbf5e5e8f
3 changed files with 25 additions and 14 deletions

View file

@ -106,6 +106,20 @@ 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 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
#=================================================
# INSTALL DEPENDENCIES
#=================================================
@ -118,19 +132,6 @@ ynh_print_info "Installing dependencies ..."
### - As well as the section "REINSTALL DEPENDENCIES" in the restore script
### - And the section "UPGRADE DEPENDENCIES" in the upgrade script
# 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
#=================================================

View file

@ -68,7 +68,14 @@ 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 AND ELIXIR
#=================================================
ynh_print_info "Removing erlang and elixir..."
sudo apt remove -y esl-erlang
sudo apt remove -y elixir
#=================================================
# REMOVE APP MAIN DIR

View file

@ -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
#=================================================