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

configpanel update password test

This commit is contained in:
Tagadda 2022-01-31 13:25:33 +00:00
parent 9c22d79bcb
commit 071d38bfb1

View file

@ -77,7 +77,7 @@ set__free_footprint() {
}
set__password() {
if [ ! $is_password_exist -eq 1 ]
if [ $password -eq "" ]
then
ynh_app_setting_set --app=$app --key=password --value="$password"
fi
@ -115,11 +115,8 @@ ynh_app_config_apply() {
then
ynh_system_user_add_group --username=$app --groups="sftp.app"
if [ $is_password_exist -eq 1 ]
if [ ! $password -eq "" ]
then
ynh_print_warn --message="A password already exist, it will not be replaced."
else
# Add the password to the user
chpasswd <<< "${app}:${password}"
fi
else