Skip to content

Commit 9458d9b

Browse files
committed
fix indents, if block styles etc
1 parent 227f9c6 commit 9458d9b

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

bin/countly.install_rhel.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ if grep -q -i "release 8" /etc/redhat-release ; then
2424
fi
2525

2626
sudo yum -y install epel-release
27+
2728
# see https://github.com/koalaman/shellcheck/issues/1871
2829
wget https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz
2930
sudo tar -C /usr/local/bin/ -xf shellcheck-v0.7.1.linux.x86_64.tar.xz --no-anchored 'shellcheck' --strip=1
30-
3131
sudo ln -sf /usr/local/bin/shellcheck /usr/bin/shellcheck
3232

3333
if [ ! -x "$(command -v python)" ]; then
@@ -52,11 +52,11 @@ enabled=1" | sudo tee /etc/yum.repos.d/nginx.repo >/dev/null
5252

5353
sudo yum install devtoolset-8 -y
5454
sudo yum install devtoolset-8-gcc* -y
55+
5556
#shellcheck source=/dev/null
5657
source /opt/rh/devtoolset-8/enable && echo -e "\nsource /opt/rh/devtoolset-8/enable" | sudo tee -a /etc/profile
5758
sudo yum install -y epel-release
5859
sudo yum install -y ShellCheck
59-
6060
else
6161
echo "Unsupported OS version, only support RHEL/Centos 8 and 7"
6262
exit 1
@@ -111,6 +111,7 @@ sudo yum install numactl -y
111111

112112
#install mongodb
113113
sudo bash "$DIR/scripts/mongodb.install.sh"
114+
114115
if [ "$INSIDE_DOCKER" == "1" ]; then
115116
sudo sed -i 's/ fork/# fork/g' /etc/mongod.conf
116117
sudo mongod -f /etc/mongod.conf &

bin/countly.install_ubuntu.sh

+11-13
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ sudo apt-get -y install wget build-essential libkrb5-dev git sqlite3 unzip bzip2
2020

2121
if [[ "$UBUNTU_YEAR" = "22" ]]; then
2222
sudo apt-get -y install python2 python2-dev
23+
2324
if [[ ! -h /usr/bin/python ]]; then
2425
sudo ln -s /usr/bin/python2.7 /usr/bin/python
2526
sudo ln -s /usr/bin/python2-config /usr/bin/python-config
@@ -68,7 +69,7 @@ set +e
6869
NODE_JS_CMD=$(which nodejs)
6970
set -e
7071
if [[ -z "$NODE_JS_CMD" ]]; then
71-
sudo ln -s "$(which node)" /usr/bin/nodejs
72+
sudo ln -s "$(which node)" /usr/bin/nodejs
7273
fi
7374

7475
#if npm is not installed, install it too
@@ -77,8 +78,7 @@ if ! (command -v npm >/dev/null) then
7778
fi
7879

7980
#install supervisor
80-
if [ "$INSIDE_DOCKER" != "1" ]
81-
then
81+
if [ "$INSIDE_DOCKER" != "1" ]; then
8282
sudo apt-get -y install supervisor || (echo "Failed to install supervisor." ; exit)
8383
cp "$DIR/config/supervisord.example.conf" "$DIR/config/supervisord.conf"
8484
fi
@@ -96,15 +96,15 @@ npm config set prefix "$DIR/../.local/"
9696
#install mongodb
9797
sudo bash "$DIR/scripts/mongodb.install.sh"
9898

99-
if [ "$INSIDE_DOCKER" == "1" ]
100-
then
101-
bash "$DIR/commands/docker/mongodb.sh" &
102-
until mongo --eval "db.stats()" | grep "collections"
103-
do
99+
if [ "$INSIDE_DOCKER" == "1" ]; then
100+
bash "$DIR/commands/docker/mongodb.sh" &
101+
102+
until mongo --eval "db.stats()" | grep "collections"; do
104103
echo
105104
echo "waiting for MongoDB to allocate files..."
106105
sleep 1
107106
done
107+
108108
sleep 3
109109
fi
110110

@@ -116,8 +116,7 @@ countly save /etc/nginx/nginx.conf "$DIR/config/nginx"
116116
sudo cp "$DIR/config/nginx.server.conf" /etc/nginx/conf.d/default.conf
117117
sudo cp "$DIR/config/nginx.conf" /etc/nginx/nginx.conf
118118

119-
if [ "$INSIDE_DOCKER" != "1" ]
120-
then
119+
if [ "$INSIDE_DOCKER" != "1" ]; then
121120
sudo /etc/init.d/nginx restart
122121
fi
123122

@@ -130,7 +129,7 @@ cp -n "$DIR/../api/config.sample.js" "$DIR/../api/config.js"
130129
cp -n "$DIR/../frontend/express/config.sample.js" "$DIR/../frontend/express/config.js"
131130

132131
if [ ! -f "$DIR/../plugins/plugins.json" ]; then
133-
cp "$DIR/../plugins/plugins.default.json" "$DIR/../plugins/plugins.json"
132+
cp "$DIR/../plugins/plugins.default.json" "$DIR/../plugins/plugins.json"
134133
fi
135134

136135
if [ ! -f "/etc/timezone" ]; then
@@ -163,8 +162,7 @@ sudo countly task dist-all
163162
sudo countly check after install
164163

165164
#finally start countly api and dashboard
166-
if [ "$INSIDE_DOCKER" != "1" ]
167-
then
165+
if [ "$INSIDE_DOCKER" != "1" ]; then
168166
sudo countly start
169167
fi
170168

bin/scripts/init_countly_user.sh

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#get current directory
44
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
55
COUNTLY_DIR="$( cd "$DIR"/../../ && pwd )"
6+
67
#check if user not created yet
78
if [ "$(getent passwd countly)x" == 'x' ]; then
89
#create countly user

0 commit comments

Comments
 (0)