@@ -20,6 +20,7 @@ sudo apt-get -y install wget build-essential libkrb5-dev git sqlite3 unzip bzip2
20
20
21
21
if [[ " $UBUNTU_YEAR " = " 22" ]]; then
22
22
sudo apt-get -y install python2 python2-dev
23
+
23
24
if [[ ! -h /usr/bin/python ]]; then
24
25
sudo ln -s /usr/bin/python2.7 /usr/bin/python
25
26
sudo ln -s /usr/bin/python2-config /usr/bin/python-config
68
69
NODE_JS_CMD=$( which nodejs)
69
70
set -e
70
71
if [[ -z " $NODE_JS_CMD " ]]; then
71
- sudo ln -s " $( which node) " /usr/bin/nodejs
72
+ sudo ln -s " $( which node) " /usr/bin/nodejs
72
73
fi
73
74
74
75
# if npm is not installed, install it too
@@ -77,8 +78,7 @@ if ! (command -v npm >/dev/null) then
77
78
fi
78
79
79
80
# install supervisor
80
- if [ " $INSIDE_DOCKER " != " 1" ]
81
- then
81
+ if [ " $INSIDE_DOCKER " != " 1" ]; then
82
82
sudo apt-get -y install supervisor || (echo " Failed to install supervisor." ; exit)
83
83
cp " $DIR /config/supervisord.example.conf" " $DIR /config/supervisord.conf"
84
84
fi
@@ -96,15 +96,15 @@ npm config set prefix "$DIR/../.local/"
96
96
# install mongodb
97
97
sudo bash " $DIR /scripts/mongodb.install.sh"
98
98
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
104
103
echo
105
104
echo " waiting for MongoDB to allocate files..."
106
105
sleep 1
107
106
done
107
+
108
108
sleep 3
109
109
fi
110
110
@@ -116,8 +116,7 @@ countly save /etc/nginx/nginx.conf "$DIR/config/nginx"
116
116
sudo cp " $DIR /config/nginx.server.conf" /etc/nginx/conf.d/default.conf
117
117
sudo cp " $DIR /config/nginx.conf" /etc/nginx/nginx.conf
118
118
119
- if [ " $INSIDE_DOCKER " != " 1" ]
120
- then
119
+ if [ " $INSIDE_DOCKER " != " 1" ]; then
121
120
sudo /etc/init.d/nginx restart
122
121
fi
123
122
@@ -130,7 +129,7 @@ cp -n "$DIR/../api/config.sample.js" "$DIR/../api/config.js"
130
129
cp -n " $DIR /../frontend/express/config.sample.js" " $DIR /../frontend/express/config.js"
131
130
132
131
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"
134
133
fi
135
134
136
135
if [ ! -f " /etc/timezone" ]; then
@@ -163,8 +162,7 @@ sudo countly task dist-all
163
162
sudo countly check after install
164
163
165
164
# finally start countly api and dashboard
166
- if [ " $INSIDE_DOCKER " != " 1" ]
167
- then
165
+ if [ " $INSIDE_DOCKER " != " 1" ]; then
168
166
sudo countly start
169
167
fi
170
168
0 commit comments