From 5c9864465932aff224fb5a19341514c9f45d52b6 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Thu, 25 May 2017 13:23:26 +0200 Subject: [PATCH] Optionnal analytics --- scripts/install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index e15f66b..3562a70 100644 --- a/scripts/install +++ b/scripts/install @@ -4,6 +4,7 @@ set -e # Exit on error # Retrieve arguments domain=$1 is_public=$2 +analytics=$YNH_APP_ARG_ANALYTICS path="" # Set up common variables @@ -96,7 +97,9 @@ sudo sed -i "s|\"SMTPPort\": \"\"|\"SMTPPort\": \"25\"|g" sudo sed -i "s|\"EnableConsole\": true|\"EnableConsole\": false|g" $final_path/config/config.json sudo sed -i "s|\"FileLocation\": \"\"|\"FileLocation\": \"/var/log/mattermost.log\"|g" $final_path/config/config.json -sudo sed -i "s|\"EnableDiagnostics\": true|\"EnableDiagnostics\": false|g" $final_path/config/config.json +if [ $analytics -eq 0 ]; then + sudo sed -i "s|\"EnableDiagnostics\": true|\"EnableDiagnostics\": false|g" $final_path/config/config.json +fi # Set permissions to app directories sudo chown -R www-data: $final_path