The "security.authorization" option is only usable for mongod and not for mongos service. When this option is applied to /etc/mongos.conf configuration file, mongos service doesn't start. Change-Id: Id798d7269ee80706002bbebe2ff666fc2fecdd1e Closes-Bug: #1748322
26 lines
492 B
Bash
Executable File
26 lines
492 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
set -o xtrace
|
|
|
|
# Remove the default pid file
|
|
rm -f /var/run/mongodb.pid
|
|
|
|
|
|
cat > /etc/mongod.conf << '_EOF_'
|
|
storage.dbPath: /var/lib/mongodb
|
|
security.authorization: enabled
|
|
storage.engine: wiredTiger
|
|
storage.journal.enabled: true
|
|
systemLog.destination: file
|
|
systemLog.logAppend: true
|
|
systemLog.path: /var/log/mongodb/mongod.log
|
|
_EOF_
|
|
|
|
|
|
cat > /etc/mongos.conf << '_EOF_'
|
|
systemLog.destination: file
|
|
systemLog.logAppend: true
|
|
systemLog.path: /var/log/mongodb/mongos.log
|
|
_EOF_
|