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:
parent
9c22d79bcb
commit
071d38bfb1
1 changed files with 2 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue