Updates to install scripts
This commit is contained in:
parent
7510846fcc
commit
e7357c1788
3 changed files with 23 additions and 15 deletions
|
@ -4,12 +4,7 @@ if hash firewall-cmd 2>/dev/null; then
|
||||||
firewallCmdExists=yes
|
firewallCmdExists=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function installBase {
|
function installPrerequisities {
|
||||||
local urlBaseTrusted="$1"
|
|
||||||
local urlBaseSandbox="$2"
|
|
||||||
local urlBasePublic="$3"
|
|
||||||
local wwwHost="$4"
|
|
||||||
|
|
||||||
yum -y install epel-release
|
yum -y install epel-release
|
||||||
|
|
||||||
curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -
|
curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -
|
||||||
|
@ -32,8 +27,15 @@ EOT
|
||||||
|
|
||||||
systemctl start mongod
|
systemctl start mongod
|
||||||
systemctl enable mongod
|
systemctl enable mongod
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function installMailtrain {
|
||||||
|
local urlBaseTrusted="$1"
|
||||||
|
local urlBaseSandbox="$2"
|
||||||
|
local urlBasePublic="$3"
|
||||||
|
local wwwHost="$4"
|
||||||
|
|
||||||
mysqlPassword=`pwgen 12 -1`
|
mysqlPassword=`pwgen 12 -1`
|
||||||
mysqlRoPassword=`pwgen 12 -1`
|
mysqlRoPassword=`pwgen 12 -1`
|
||||||
|
|
||||||
|
@ -259,6 +261,8 @@ EOT
|
||||||
|
|
||||||
|
|
||||||
function createCertificates {
|
function createCertificates {
|
||||||
|
# This assumes that HTTPD is not yet running
|
||||||
|
|
||||||
local hostTrusted="$1"
|
local hostTrusted="$1"
|
||||||
local hostSandbox="$2"
|
local hostSandbox="$2"
|
||||||
local hostPublic="$3"
|
local hostPublic="$3"
|
||||||
|
|
|
@ -43,10 +43,12 @@ hostSandbox="$2"
|
||||||
hostPublic="$3"
|
hostPublic="$3"
|
||||||
email="$4"
|
email="$4"
|
||||||
|
|
||||||
|
installPrerequisities
|
||||||
|
|
||||||
createCertificates "${hostTrusted}" "${hostSandbox}" "${hostPublic}" "${email}"
|
createCertificates "${hostTrusted}" "${hostSandbox}" "${hostPublic}" "${email}"
|
||||||
|
|
||||||
installHttps "${hostTrusted}" 443 "${hostSandbox}" 443 "${hostPublic}" 443 "/etc/letsencrypt/live/${hostPublic}/cert.pem" "/etc/letsencrypt/live/${hostPublic}/privkey.pem" "/etc/letsencrypt/live/${hostPublic}/chain.pem"
|
installHttps "${hostTrusted}" 443 "${hostSandbox}" 443 "${hostPublic}" 443 "/etc/letsencrypt/live/${hostPublic}/cert.pem" "/etc/letsencrypt/live/${hostPublic}/privkey.pem" "/etc/letsencrypt/live/${hostPublic}/chain.pem"
|
||||||
|
|
||||||
installBase "https://${hostTrusted}" "https://${hostSandbox}" "https://${hostPublic}" 127.0.0.1
|
installMailtrain "https://${hostTrusted}" "https://${hostSandbox}" "https://${hostPublic}" 127.0.0.1
|
||||||
|
|
||||||
installService
|
installService
|
||||||
|
|
|
@ -36,6 +36,8 @@ if [ $# -lt 0 ]; then
|
||||||
HELP
|
HELP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
installBase http://localhost:3000 http://localhost:3003 http://localhost:3004 0.0.0.0
|
installPrerequisities
|
||||||
|
|
||||||
|
installMailtrain http://localhost:3000 http://localhost:3003 http://localhost:3004 0.0.0.0
|
||||||
|
|
||||||
installService
|
installService
|
||||||
|
|
Loading…
Reference in a new issue