forked from zebrunner/community-edition
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·37 lines (27 loc) · 955 Bytes
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
BASEDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${BASEDIR}
HOST_NAME=$1
if [ $# -lt 1 ]; then
printf 'Usage: %s HOST_NAME\n' "$(basename "$0")" >&2
exit -1
fi
echo generating variables.env...
sed 's/demo.qaprosoft.com/'$1'/g' variables.env.original > variables.env
echo generating ./nginx/conf.d/default.conf...
sed 's/demo.qaprosoft.com/'$1'/g' ./nginx/conf.d/default.conf.original > ./nginx/conf.d/default.conf
if [[ ! -d esdata ]]; then
echo creating esdata folder for elastic search...
echo WARNING! Increase vm.max_map_count=262144 appending it to /etc/sysctl.conf on Linux Ubuntu
echo your current value is `sysctl vm.max_map_count`
mkdir esdata
fi
if [[ ! -d jenkins ]]; then
echo creating jenkins folder...
mkdir jenkins
fi
if [ ! -d assets ]; then
echo creating folder to store zafira assets...
mkdir -p assets;
fi
echo Setup finished successfully using $HOST_NAME hostname.