1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/friendica_ynh.git synced 2024-09-03 18:36:14 +02:00

Fix admin email not getting replaced and added php-mbstring dependency

This commit is contained in:
anmol26s 2018-09-24 12:23:06 +05:30
parent a6532a40f5
commit 44920fad02
3 changed files with 9 additions and 11 deletions

View file

@ -70,8 +70,7 @@ ynh_app_setting_set $app database $database
#================================================= #=================================================
# INSTALL DEPENDENCIES # 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 # CREATE A MYSQL DATABASE
@ -104,13 +103,12 @@ ynh_add_nginx_config
# configure friendica # configure friendica
sudo cp "../conf/htconfig.php" "/var/www/$app/.htconfig.php"
sudo cp "$final_path/htconfig.php" "$final_path/.htconfig.php"
ynh_replace_string "your.mysqlhost.com" "localhost" "$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 "mysqlusername" "$db_name" "$final_path/.htconfig.php"
ynh_replace_string "mysqldatabasename" "$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 "mysqlpassword" "$db_pwd" "$final_path/.htconfig.php"
ynh_replace_string "['admin_email'] = '';" "['admin_email'] = '$admin_mail';" "$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" 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"

View file

@ -80,7 +80,7 @@ ynh_restore_file "/etc/php5/fpm/conf.d/20-$app.ini"
# REINSTALL DEPENDENCIES # 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 # set permission

View file

@ -33,7 +33,7 @@ ynh_clean_setup () {
ynh_abort_if_errors ynh_abort_if_errors
# Add Dependencies # 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 # Create a temporary directory