From 3fc14db5d57a809c18f4f31bdd81b3d672eb4b6e Mon Sep 17 00:00:00 2001 From: Marc Ole Bulling Date: Sun, 22 Mar 2020 16:55:23 +0000 Subject: [PATCH] Check if all dependencies are installed (#639) * Added check if all dependencies are installed and config.php/config-dist.php exists * Also check for php modules * Uncomment code that was accidentally disabled for debug purposes --- helpers/PrerequisiteChecker.php | 50 +++++++++++++++++++++++++++++++++ public/index.php | 10 +++++++ 2 files changed, 60 insertions(+) create mode 100644 helpers/PrerequisiteChecker.php diff --git a/helpers/PrerequisiteChecker.php b/helpers/PrerequisiteChecker.php new file mode 100644 index 00000000..5730081a --- /dev/null +++ b/helpers/PrerequisiteChecker.php @@ -0,0 +1,50 @@ + \ No newline at end of file diff --git a/public/index.php b/public/index.php index 64e013e1..f65a1f7a 100644 --- a/public/index.php +++ b/public/index.php @@ -1,3 +1,13 @@ checkRequirements(); +} catch (ERequirementNotMet $e) { + die("Unable to run grocy: " . $e->getMessage()); +} + require_once __DIR__ . '/../app.php'; + +?> \ No newline at end of file