Skip to content
Snippets Groups Projects
Commit 6b69a6d2 authored by Bob Mottram's avatar Bob Mottram
Browse files

Populate the lychee database

parent d3e1aba1
No related branches found
No related tags found
No related merge requests found
......@@ -384,6 +384,16 @@ function install_lychee_from_repo {
set_completion_param "lychee commit" "$LYCHEE_COMMIT"
}
function lychee_run_installation {
if [ ! "$LYCHEE_ADMIN_PASSWORD" ]; then
echo $'No lychee database password'
exit 62
fi
cd "/var/www/${LYCHEE_DOMAIN_NAME}/htdocs/php" || exit 27
cat "/var/www/${LYCHEE_DOMAIN_NAME}/htdocs/php/database/"*.sql > lychee_install.sql
initialise_database lychee lychee_install.sql
}
function lychee_create_config {
MARIADB_PASSWORD=$("${PROJECT_NAME}-pass" -u root -a mariadb)
{ echo '<?php';
......@@ -473,6 +483,9 @@ function install_lychee {
function_check lychee_create_config
lychee_create_config
function_check lychee_run_installation
lychee_run_installation
increment_app_install_progress
systemctl restart mariadb
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment