From ab66979f68473b74d2df4a9c89c2a06402aa0fa2 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sun, 25 Nov 2018 16:19:51 +0100 Subject: [PATCH] Upgrade ynh1=>ynh2 - mysqlpwd setting --- scripts/upgrade | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index a6c07de..e714d6e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -61,6 +61,15 @@ if [[ $?==0 ]]; then fi +#mysqlpwd setting was implemented in ynh2 - check if saved and if not implement +db_pass=$(ynh_app_setting_get $app mysqlpwd) +if [ -z $db_pass]; 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) + dbpass=${t:26:24} + ynh_appsetting_set $app mysqlpwd $db_pass +fi + # Copy source files cp -a ../src/bin/. $final_path/bin cp -a ../src/lib/. $final_path/lib