From a87a08cd61e079e03d0987e292cf331842974b15 Mon Sep 17 00:00:00 2001 From: liberodark Date: Mon, 29 Jul 2019 20:06:17 +0200 Subject: [PATCH] update --- scripts/install | 54 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/scripts/install b/scripts/install index 303d324..e877088 100644 --- a/scripts/install +++ b/scripts/install @@ -100,25 +100,12 @@ ynh_mysql_setup_db $db_name $db_name # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_print_info "Download BookStack" + 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" -#================================================= -# SPECIFIC SETUP -#================================================= - -# setup application config -cp -a ../conf/.env.example $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" - #================================================= # INSTALL COMPOSER #================================================= @@ -140,6 +127,43 @@ else exit 1 fi +#================================================= +# INSTALL BOOKSTACK DEPS +#================================================= + +ynh_print_info "Install BookStack composer dependancies" + +pushd $final_path || exit +php composer.phar install +popd || exit + +#================================================= +# SPECIFIC SETUP +#================================================= + +# setup application config +cp -a ../conf/.env.example $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" + +#================================================= +# FINAL BOOKSTACK INSTALL +#================================================= + +ynh_print_info "Install BookStack" + +pushd $final_path || exit +php artisan key:generate --no-interaction --force +php artisan migrate --no-interaction --force +chown www-data:www-data -R bootstrap/cache public/uploads storage && chmod -R 755 bootstrap/cache public/uploads storage +popd || exit + #================================================= # NGINX CONFIGURATION #=================================================