From f74a8c988b80f6533e2e193e86ae6a0d0230539e Mon Sep 17 00:00:00 2001 From: anmol26s Date: Sun, 17 Jun 2018 04:36:59 +0530 Subject: [PATCH] Fix install --- scripts/_common.sh | 2 +- scripts/install | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index eb34bcc..1196c8b 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -96,7 +96,7 @@ init_composer() { || ynh_die "Unable to install Composer" # update dependencies to create composer.lock - exec_composer "$DESTDIR" install --quiet --no-dev --prefer-dist \ + exec_composer "$DESTDIR" install --quiet --no-dev \ || ynh_die "Unable to update firefly-iii core dependencies" } diff --git a/scripts/install b/scripts/install index ef9186a..38a1ac6 100755 --- a/scripts/install +++ b/scripts/install @@ -85,7 +85,7 @@ ynh_app_setting_set $app final_path $final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source "$final_path" -init_composer $final_path + #================================================= # NGINX CONFIGURATION @@ -118,6 +118,17 @@ email=$(ynh_user_get_info $admin 'mail') # setup application config sudo cp ../conf/.env $final_path/.env +#================================================= +# MODIFY A CONFIG FILE +#================================================= + +ynh_replace_string "yunouser" "$db_name" "$final_path/.env" +ynh_replace_string "yunopass" "$db_pwd" "$final_path/.env" +ynh_replace_string "yunobase" "$db_name" "$final_path/.env" +ynh_replace_string "yunomail" "$email" "$final_path/.env" +ynh_replace_string "yunodomain" "$domain" "$final_path/.env" + +init_composer $final_path cd $final_path && sudo /usr/bin/php7.1 artisan -n key:generate --force cd $final_path && sudo /usr/bin/php7.1 artisan config:clear