From cab30de6850c5e2fdc4ee87d3f42bfd0f1f626a7 Mon Sep 17 00:00:00 2001 From: Grena Date: Wed, 5 Jun 2024 09:59:35 +0200 Subject: [PATCH] Fix password change --- scripts/config | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/config b/scripts/config index 21b6f17..7bb46c3 100644 --- a/scripts/config +++ b/scripts/config @@ -59,7 +59,7 @@ get__free_footprint() { #================================================= set__password() { - if [ "$password" == "" ] + if [ ! "$password" == "" ] then ynh_app_setting_set --app=$app --key=password --value="$password" fi @@ -147,6 +147,11 @@ ynh_app_config_apply() { then ynh_system_user_del_group --username=$app --groups="sftp.app" fi + + if [ "${changed[password]}" == "true" ] && [ ! "$password" == "" ] + then + chpasswd <<< "${app}:${password}" + fi if [ "$phpversion" != "none" ] then