From 4eaedf0ac340ff5a84c964fa0d8ddeb296cc66bb Mon Sep 17 00:00:00 2001 From: root Date: Sun, 23 Dec 2018 22:14:34 +0000 Subject: [PATCH] Updates in the install script (not complete yet) --- setup/install-centos7.sh | 56 ++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/setup/install-centos7.sh b/setup/install-centos7.sh index b5520a83..f37584cb 100644 --- a/setup/install-centos7.sh +++ b/setup/install-centos7.sh @@ -10,13 +10,41 @@ fi set -e +SCRIPT_PATH=$(dirname $(realpath -s $0)) +cd $SCRIPT_PATH/.. + +#Help function +function HELP { +cat << EOF + +Basic usage: install-centos7.sh + +Installs Mailtrain 2 on CentOS 7. + +Example (local installation): install-centos7.sh http://localhost:3000 http://localhost:3003 http://localhost:3004 +Example (installation behind HTTPD proxy - see mailtrain-apache-sample.conf): install-centos7.sh https://mailtrain.example.com https://sbox.mailtrain.example.com https://mail.example.com +EOF + + exit 1 +} + +if [ $# -lt 3 ]; then + echo "Error: incorrect number of parameters." + HELP +fi + +URL_BASE_TRUSTED="$1" +URL_BASE_SANDBOX="$2" +URL_BASE_PUBLIC="$3" + + yum -y install epel-release curl --silent --location https://rpm.nodesource.com/setup_11.x | bash - cat > /etc/yum.repos.d/mongodb-org.repo < config/production.yaml < server/config/production.yaml <> workers/reports/config/production.yaml <> server/services/workers/reports/config/production.yaml <