From 44920fad0225d3c54a24fc4ec92505ce54d5d2ab Mon Sep 17 00:00:00 2001 From: anmol26s Date: Mon, 24 Sep 2018 12:23:06 +0530 Subject: [PATCH] Fix admin email not getting replaced and added php-mbstring dependency --- scripts/install | 16 +++++++--------- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/scripts/install b/scripts/install index e1c40b9..c847241 100644 --- a/scripts/install +++ b/scripts/install @@ -70,8 +70,7 @@ ynh_app_setting_set $app database $database #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_install_app_dependencies php5-cli 'php5-imagick|php-imagick' php5-gd php5-mcrypt 'php-xml|base-files(<<9.0)' - +ynh_install_app_dependencies 'php-mbstring|base-files(<<9.0)' php5-cli 'php5-imagick|php-imagick' php5-gd php5-mcrypt 'php-xml|base-files(<<9.0)' #================================================= # CREATE A MYSQL DATABASE @@ -104,13 +103,12 @@ ynh_add_nginx_config # configure friendica - -sudo cp "$final_path/htconfig.php" "$final_path/.htconfig.php" -ynh_replace_string "your.mysqlhost.com" "localhost" "$final_path/.htconfig.php" -ynh_replace_string "mysqlusername" "$db_name" "$final_path/.htconfig.php" -ynh_replace_string "mysqldatabasename" "$db_name" "$final_path/.htconfig.php" -ynh_replace_string "mysqlpassword" "$db_pwd" "$final_path/.htconfig.php" -ynh_replace_string "['admin_email'] = '';" "['admin_email'] = '$admin_mail';" "$final_path/.htconfig.php" +sudo cp "../conf/htconfig.php" "/var/www/$app/.htconfig.php" +ynh_replace_string "your.mysqlhost.com" "localhost" "$final_path/.htconfig.php" +ynh_replace_string "mysqlusername" "$db_name" "$final_path/.htconfig.php" +ynh_replace_string "mysqldatabasename" "$db_name" "$final_path/.htconfig.php" +ynh_replace_string "mysqlpassword" "$db_pwd" "$final_path/.htconfig.php" +ynh_replace_string "__ADMIN_EMAIL__" "$admin_mail" "$final_path/.htconfig.php" ynh_replace_string "die('The configuration you did manually contains some mistakes. Please have a look at your .htconfig.php file.');" "// die('The configuration you did manually contains some mistakes. Please have a look at your .htconfig.php file.');" "$final_path/.htconfig.php" diff --git a/scripts/restore b/scripts/restore index 41bf54d..879d349 100644 --- a/scripts/restore +++ b/scripts/restore @@ -80,7 +80,7 @@ ynh_restore_file "/etc/php5/fpm/conf.d/20-$app.ini" # REINSTALL DEPENDENCIES #================================================= -ynh_install_app_dependencies php5-cli 'php5-imagick|php-imagick' php5-gd php5-mcrypt 'php-xml|base-files(<<9.0)' +ynh_install_app_dependencies 'php-mbstring|base-files(<<9.0)' php5-cli 'php5-imagick|php-imagick' php5-gd php5-mcrypt 'php-xml|base-files(<<9.0)' # set permission diff --git a/scripts/upgrade b/scripts/upgrade index 005f5ac..fe5f4dc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -33,7 +33,7 @@ ynh_clean_setup () { ynh_abort_if_errors # Add Dependencies -ynh_install_app_dependencies php5-cli 'php5-imagick|php-imagick' php5-gd php5-mcrypt 'php-xml|base-files(<<9.0)' +ynh_install_app_dependencies 'php-mbstring|base-files(<<9.0)' php5-cli 'php5-imagick|php-imagick' php5-gd php5-mcrypt 'php-xml|base-files(<<9.0)' # Create a temporary directory