1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/monitorix_ynh.git synced 2024-09-03 19:46:06 +02:00

Cleanup removeme and fix helper call

This commit is contained in:
Josué Tille 2024-09-03 12:56:45 +02:00
parent f00f924348
commit 8f9af8dc89
No known key found for this signature in database
GPG key ID: 5F259226AD51F2F5
3 changed files with 4 additions and 6 deletions

View file

@ -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
}

View file

@ -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

View file

@ -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