X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/494f8ffb69ff251b3448a5027a5e6b39f7dfd77b..c9610f1e514f31982e2d9e79b5ad9b6037551b68:/src/phorkie/SetupCheck.php diff --git a/src/phorkie/SetupCheck.php b/src/phorkie/SetupCheck.php index f1fbc0f..8c09519 100644 --- a/src/phorkie/SetupCheck.php +++ b/src/phorkie/SetupCheck.php @@ -32,9 +32,7 @@ class SetupCheck $sc->checkDeps(); $sc->checkDirs(); $sc->checkGit(); - if ($this->elasticsearch != '') { - $sc->checkDatabase(); - } + $sc->checkDatabase(); } public function checkDeps() @@ -76,10 +74,17 @@ class SetupCheck public function checkDatabase() { + if ($this->elasticsearch != '') { + return; + } + $es = parse_url($this->elasticsearch); if (!preg_match("#/.+/#", $es['path'], $matches)) { - $this->fail('Improper elasticsearch url. Elasticsearch requires a' - . ' search domain to store your data. (e.g. http://localhost:9200/phorkie/)'); + $this->fail( + 'Improper elasticsearch url. Elasticsearch requires a' + . ' search domain to store your data.' + . ' (e.g. http://localhost:9200/phorkie/)' + ); } $dbs = new Database(); $dbs->getSetup()->setup();