From 8f9af8dc898e4df752d21b085cca74b6097b41a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Tue, 3 Sep 2024 12:56:45 +0200 Subject: [PATCH] Cleanup removeme and fix helper call --- scripts/_common.sh | 4 ++-- scripts/config | 2 -- scripts/remove | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 8158f3f..9dddb17 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -169,10 +169,10 @@ configure_db() { # Here the idea is to monitor available database # So if mysql is installed we monitor it but mysql could also not be installed and in this case don't need to monitor it # For postgresql it's the same case - if $mysql_installed && ! ynh_mysql_user_exists --user="$db_user"; then + if $mysql_installed && ! ynh_mysql_user_exists "$db_user"; then ynh_mysql_create_user "$db_user" "$db_pwd" fi - if $postgresql_installed && ! ynh_psql_user_exists --user="$db_user"; then + if $postgresql_installed && ! ynh_psql_user_exists "$db_user"; then ynh_psql_create_user "$db_user" "$db_pwd" fi } diff --git a/scripts/config b/scripts/config index a3457b9..ce4afce 100644 --- a/scripts/config +++ b/scripts/config @@ -8,8 +8,6 @@ source ./_common.sh source /usr/share/yunohost/helpers -#REMOVEME? ynh_abort_if_errors - ynh_app_config_apply() { _ynh_app_config_apply load_vars diff --git a/scripts/remove b/scripts/remove index cdcd09b..1448d49 100755 --- a/scripts/remove +++ b/scripts/remove @@ -41,10 +41,10 @@ for pool_dir_by_version in /etc/php/*; do fi done -if $mysql_installed && ynh_mysql_user_exists --user="$db_user"; then +if $mysql_installed && ynh_mysql_user_exists "$db_user"; then ynh_mysql_drop_user "$db_user" fi -if $postgresql_installed && ynh_psql_user_exists --user="$db_user"; then +if $postgresql_installed && ynh_psql_user_exists "$db_user"; then ynh_psql_drop_user "$db_user" fi