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

Fix variables retrieval

This commit is contained in:
yalh76 2022-06-26 16:13:25 +02:00
parent 6794ec6918
commit c7d2d8992e

View file

@ -73,16 +73,12 @@ if [ -z "$final_path" ]; then
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 $final_path/conf.php | grep DBPASS)
db_pwd=${t:26:24}
db_pwd=$(grep DBPASS $final_path/conf.php | cut -d"'" -f4)
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}
password=$(grep ADMIN_PASSWORD $final_path/conf.php | cut -d"'" -f4)
ynh_app_setting_set --app=$app --key=password --value=$password
fi