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