File tree 5 files changed +60
-0
lines changed 5 files changed +60
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,18 @@ _dbPath() {
172
172
fi
173
173
fi
174
174
175
+ if [ -z " $dbPath " ]; then
176
+ if _mongod_hack_have_arg --configsvr " $@ " || {
177
+ _parse_config " $@ " \
178
+ && clusterRole=" $( jq -r ' .sharding.clusterRole // empty' " $jsonConfigFile " ) " \
179
+ && [ " $clusterRole " = ' configsvr' ]
180
+ }; then
181
+ # if running as config server, then the default dbpath is /data/configdb
182
+ # https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-configsvr
183
+ dbPath=/data/configdb
184
+ fi
185
+ fi
186
+
175
187
: " ${dbPath:=/ data/ db} "
176
188
177
189
echo " $dbPath "
Original file line number Diff line number Diff line change @@ -172,6 +172,18 @@ _dbPath() {
172
172
fi
173
173
fi
174
174
175
+ if [ -z " $dbPath " ]; then
176
+ if _mongod_hack_have_arg --configsvr " $@ " || {
177
+ _parse_config " $@ " \
178
+ && clusterRole=" $( jq -r ' .sharding.clusterRole // empty' " $jsonConfigFile " ) " \
179
+ && [ " $clusterRole " = ' configsvr' ]
180
+ }; then
181
+ # if running as config server, then the default dbpath is /data/configdb
182
+ # https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-configsvr
183
+ dbPath=/data/configdb
184
+ fi
185
+ fi
186
+
175
187
: " ${dbPath:=/ data/ db} "
176
188
177
189
echo " $dbPath "
Original file line number Diff line number Diff line change @@ -172,6 +172,18 @@ _dbPath() {
172
172
fi
173
173
fi
174
174
175
+ if [ -z " $dbPath " ]; then
176
+ if _mongod_hack_have_arg --configsvr " $@ " || {
177
+ _parse_config " $@ " \
178
+ && clusterRole=" $( jq -r ' .sharding.clusterRole // empty' " $jsonConfigFile " ) " \
179
+ && [ " $clusterRole " = ' configsvr' ]
180
+ }; then
181
+ # if running as config server, then the default dbpath is /data/configdb
182
+ # https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-configsvr
183
+ dbPath=/data/configdb
184
+ fi
185
+ fi
186
+
175
187
: " ${dbPath:=/ data/ db} "
176
188
177
189
echo " $dbPath "
Original file line number Diff line number Diff line change @@ -172,6 +172,18 @@ _dbPath() {
172
172
fi
173
173
fi
174
174
175
+ if [ -z " $dbPath " ]; then
176
+ if _mongod_hack_have_arg --configsvr " $@ " || {
177
+ _parse_config " $@ " \
178
+ && clusterRole=" $( jq -r ' .sharding.clusterRole // empty' " $jsonConfigFile " ) " \
179
+ && [ " $clusterRole " = ' configsvr' ]
180
+ }; then
181
+ # if running as config server, then the default dbpath is /data/configdb
182
+ # https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-configsvr
183
+ dbPath=/data/configdb
184
+ fi
185
+ fi
186
+
175
187
: " ${dbPath:=/ data/ db} "
176
188
177
189
echo " $dbPath "
Original file line number Diff line number Diff line change @@ -172,6 +172,18 @@ _dbPath() {
172
172
fi
173
173
fi
174
174
175
+ if [ -z " $dbPath " ]; then
176
+ if _mongod_hack_have_arg --configsvr " $@ " || {
177
+ _parse_config " $@ " \
178
+ && clusterRole=" $( jq -r ' .sharding.clusterRole // empty' " $jsonConfigFile " ) " \
179
+ && [ " $clusterRole " = ' configsvr' ]
180
+ }; then
181
+ # if running as config server, then the default dbpath is /data/configdb
182
+ # https://docs.mongodb.com/manual/reference/program/mongod/#cmdoption-mongod-configsvr
183
+ dbPath=/data/configdb
184
+ fi
185
+ fi
186
+
175
187
: " ${dbPath:=/ data/ db} "
176
188
177
189
echo " $dbPath "
You can’t perform that action at this time.
0 commit comments