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

Fix remove steps

This commit is contained in:
yalh76 2019-03-19 23:54:41 +01:00
parent 3eee0a24e2
commit f3e9605dae

View file

@ -6,9 +6,9 @@
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
source _common.sh # Loads the generic functions usually used in the script source _common.sh
# Source app helpers
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
source ynh_install_ruby
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
@ -17,10 +17,9 @@ ynh_print_info "Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
# Retrieve app settings domain=$(ynh_app_setting_get $app domain)
domain=$(ynh_app_setting_get "$app" domain) db_name=$(ynh_app_setting_get $app db_name)
db_name=$(ynh_app_setting_get "$app" db_name) final_path=$(ynh_app_setting_get $app final_path)
final_path=$(ynh_app_setting_get "$app" final_path)
#================================================= #=================================================
# STANDARD REMOVE # STANDARD REMOVE
@ -28,21 +27,21 @@ final_path=$(ynh_app_setting_get "$app" final_path)
# REMOVE SERVICE FROM ADMIN PANEL # REMOVE SERVICE FROM ADMIN PANEL
#================================================= #=================================================
if yunohost service status | grep -q "$app-web" if yunohost service status "$app-web" >/dev/null 2>&1
then then
echo "Remove $app-web service" ynh_print_info "Removing $app-web service"
yunohost service remove "$app-web" yunohost service remove "$app-web"
fi fi
if yunohost service status | grep -q "$app-sidekiq" if yunohost service status "$app-sidekiq" >/dev/null 2>&1
then then
echo "Remove $app-sidekiq service" ynh_print_info "Removing $app-sidekiq service"
yunohost service remove "$app-sidekiq" yunohost service remove "$app-sidekiq"
fi fi
if yunohost service status | grep -q "$app-streaming" if yunohost service status "$app-streaming" >/dev/null 2>&1
then then
echo "Remove $app-streaming service" ynh_print_info "Removing $app-streaming service"
yunohost service remove "$app-streaming" yunohost service remove "$app-streaming"
fi fi
@ -62,7 +61,7 @@ ynh_remove_systemd_config "$app-streaming"
ynh_print_info "Removing the PostgreSQL database" ynh_print_info "Removing the PostgreSQL database"
# delete postgresql database & user # delete postgresql database & user
ynh_psql_remove_db "$db_name" "$app" ynh_psql_remove_db $db_name $db_name
#================================================= #=================================================
# REMOVE DEPENDENCIES # REMOVE DEPENDENCIES
@ -70,6 +69,7 @@ ynh_psql_remove_db "$db_name" "$app"
ynh_print_info "Removing dependencies" ynh_print_info "Removing dependencies"
# Remove metapackage and its dependencies # Remove metapackage and its dependencies
ynh_remove_ruby
ynh_remove_app_dependencies ynh_remove_app_dependencies
ynh_remove_nodejs ynh_remove_nodejs