aboutsummaryrefslogtreecommitdiff
path: root/scripts/remove
diff options
context:
space:
mode:
authoryalh76 <yalh@yahoo.com>2019-03-19 23:54:41 +0100
committeryalh76 <yalh@yahoo.com>2019-03-19 23:54:41 +0100
commitf3e9605dae3798ceafe42c513caf567ae8988b15 (patch)
treeb9a1327566e8fe8842847620c536a91e02e5b47d /scripts/remove
parent3eee0a24e2518c63f600986a8911265f9f66fcfc (diff)
downloadmastodon_ynh-f3e9605dae3798ceafe42c513caf567ae8988b15.tar.gz
mastodon_ynh-f3e9605dae3798ceafe42c513caf567ae8988b15.tar.bz2
mastodon_ynh-f3e9605dae3798ceafe42c513caf567ae8988b15.zip
Fix remove steps
Diffstat (limited to 'scripts/remove')
-rw-r--r--scripts/remove26
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/remove b/scripts/remove
index 14bcf31..19fd67f 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -6,9 +6,9 @@
# IMPORT GENERIC HELPERS
#=================================================
-source _common.sh # Loads the generic functions usually used in the script
-# Source app helpers
+source _common.sh
source /usr/share/yunohost/helpers
+source ynh_install_ruby
#=================================================
# LOAD SETTINGS
@@ -17,10 +17,9 @@ ynh_print_info "Loading installation settings..."
app=$YNH_APP_INSTANCE_NAME
-# Retrieve app settings
-domain=$(ynh_app_setting_get "$app" domain)
-db_name=$(ynh_app_setting_get "$app" db_name)
-final_path=$(ynh_app_setting_get "$app" final_path)
+domain=$(ynh_app_setting_get $app domain)
+db_name=$(ynh_app_setting_get $app db_name)
+final_path=$(ynh_app_setting_get $app final_path)
#=================================================
# STANDARD REMOVE
@@ -28,21 +27,21 @@ final_path=$(ynh_app_setting_get "$app" final_path)
# REMOVE SERVICE FROM ADMIN PANEL
#=================================================
-if yunohost service status | grep -q "$app-web"
+if yunohost service status "$app-web" >/dev/null 2>&1
then
- echo "Remove $app-web service"
+ ynh_print_info "Removing $app-web service"
yunohost service remove "$app-web"
fi
-if yunohost service status | grep -q "$app-sidekiq"
+if yunohost service status "$app-sidekiq" >/dev/null 2>&1
then
- echo "Remove $app-sidekiq service"
+ ynh_print_info "Removing $app-sidekiq service"
yunohost service remove "$app-sidekiq"
fi
-if yunohost service status | grep -q "$app-streaming"
+if yunohost service status "$app-streaming" >/dev/null 2>&1
then
- echo "Remove $app-streaming service"
+ ynh_print_info "Removing $app-streaming service"
yunohost service remove "$app-streaming"
fi
@@ -62,7 +61,7 @@ ynh_remove_systemd_config "$app-streaming"
ynh_print_info "Removing the PostgreSQL database"
# delete postgresql database & user
-ynh_psql_remove_db "$db_name" "$app"
+ynh_psql_remove_db $db_name $db_name
#=================================================
# REMOVE DEPENDENCIES
@@ -70,6 +69,7 @@ ynh_psql_remove_db "$db_name" "$app"
ynh_print_info "Removing dependencies"
# Remove metapackage and its dependencies
+ynh_remove_ruby
ynh_remove_app_dependencies
ynh_remove_nodejs