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