1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/emailpoubelle_ynh.git synced 2024-09-03 18:26:29 +02:00

Fix password

This commit is contained in:
yalh76 2022-06-18 15:31:20 +02:00
parent baf84a56f9
commit 14a4272388
2 changed files with 10 additions and 1 deletions

View file

@ -47,6 +47,7 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=admin --value=$admin
ynh_app_setting_set --app=$app --key=password --value=$password
#=================================================
# STANDARD MODIFICATIONS

View file

@ -23,6 +23,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
password=$(ynh_app_setting_get --app=$app --key=password)
#=================================================
# CHECK VERSION
@ -73,11 +74,18 @@ fi
if [ -z $db_pwd ]; then
#c'est moche mais ça fera bien l'affaire - en deux lignes sinon pb en fonction du type de shell
t=$(cat /var/www/$app/conf.php | grep DBPASS)
t=$(cat $final_path/conf.php | grep DBPASS)
db_pwd=${t:26:24}
ynh_app_setting_set --app=$app --key=mysqlpwd --value=$db_pwd
fi
if [ -z $password ]; then
#c'est moche mais ça fera bien l'affaire - en deux lignes sinon pb en fonction du type de shell
t=$(cat $final_path/conf.php | grep ADMIN_PASSWORD)
password=${t:26:24}
ynh_app_setting_set --app=$app --key=password --value=$password
fi
#=================================================
# CREATE DEDICATED USER
#=================================================