From c287a7c21b1c213d2d598f9b0507c2fd347c5444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Lebleu?= Date: Sun, 22 May 2016 22:55:22 +0200 Subject: [PATCH] [enh] Remove the app silently --- scripts/remove | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/remove b/scripts/remove index ce4454e..e7e7553 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,8 +12,8 @@ dbuser=$app . /usr/share/yunohost/helpers # Drop MySQL database and user -ynh_mysql_drop_db $dbname || true -ynh_mysql_drop_user $dbuser || true +ynh_mysql_drop_db "$dbname" 2>&1 || true +ynh_mysql_drop_user "$dbuser" 2>&1 || true # Retrieve domain from app settings domain=$(ynh_app_setting_get $app domain) @@ -28,4 +28,6 @@ sudo service php5-fpm restart || true sudo service nginx reload || true # Remove app dependencies -ynh_package_autoremove "$DEPS_PKG_NAME" || true +if ynh_package_is_installed "$DEPS_PKG_NAME"; then + ynh_package_autoremove "$DEPS_PKG_NAME" +fi