From eeb449458929dab9fa191709e678593ac5b2058f Mon Sep 17 00:00:00 2001 From: Hardware Date: Mon, 8 Aug 2016 08:09:01 +0200 Subject: [PATCH] feat(): add debug mode --- README.md | 1 + startup | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 2441047..839ed5a 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Flarum is the next-generation forum software that makes online discussion fun. I | -------- | ----------- | ---- | ------------- | | **GID** | Flarum user id | *optional* | 991 | **UID** | Flarum group id | *optional* | 991 +| **DEBUG** | Flarum debug mode | *optional* | false | **FORUM_URL** | Forum URL | **required** | none | **DB_HOST** | MariaDB instance ip/hostname | *optional* | mariadb | **DB_USER** | MariaDB database username | *optional* | flarum diff --git a/startup b/startup index 22fd3ca..5823384 100644 --- a/startup +++ b/startup @@ -4,11 +4,13 @@ export DB_HOST export DB_USER export DB_NAME +export DEBUG # Default values DB_HOST=${DB_HOST:-mariadb} DB_USER=${DB_USER:-flarum} DB_NAME=${DB_NAME:-flarum} +DEBUG=${DEBUG:-false} # Required env variables if [ -z "$DB_PASS" ]; then @@ -105,6 +107,11 @@ else fi +# Set flarum debug mode +if [ -f "config.php" ]; then + sed -i "s|\('debug' =>\) .*|\1 ${DEBUG},|" config.php +fi + # Removing installation files rm -f config.sql config.yml