Skip to content

DOCSP-15404 convert codeblock shell to bash part 2 #5168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/about.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ complete the
You can clone the repository by issuing the following command at your
system shell:

.. code-block:: sh
.. code-block:: bash

git clone git://github.com/mongodb/docs.git

Expand Down
8 changes: 4 additions & 4 deletions source/administration/configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,20 @@ provided. This initialization script can be used to start the
- On Linux systems that use the **systemd** init system (the
``systemctl`` command):

.. code-block:: sh
.. code-block:: bash

sudo systemctl start mongod

- On Linux systems that use the **SystemV init** init system (the
``service`` command):

.. code-block:: sh
.. code-block:: bash

sudo service mongod start

- On macOS, using the ``brew`` package manger:

.. code-block:: sh
.. code-block:: bash

brew services start mongodb-community@{+version+}

Expand All @@ -58,7 +58,7 @@ a MongoDB instance with this configuration file by using either the
:option:`--config <mongod --config>` or :option:`-f <mongod --config>`
options to :binary:`~bin.mongod`. For example, on Linux:

.. code-block:: sh
.. code-block:: bash

mongod --config /etc/mongod.conf
mongod -f /etc/mongod.conf
Expand Down
36 changes: 18 additions & 18 deletions source/administration/production-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,11 @@ NUMA for use with MongoDB.

#. Disable *zone reclaim* with one of the following commands:

.. code-block:: sh
.. code-block:: bash

echo 0 | sudo tee /proc/sys/vm/zone_reclaim_mode

.. code-block:: sh
.. code-block:: bash

sudo sysctl -w vm.zone_reclaim_mode=0

Expand All @@ -372,7 +372,7 @@ NUMA for use with MongoDB.
platform's init system. Run the following command to determine which
init system is in use on your platform:

.. code-block:: sh
.. code-block:: bash

ps --no-headers -o comm 1

Expand Down Expand Up @@ -405,42 +405,42 @@ NUMA for use with MongoDB.

#. Copy the default MongoDB service file:

.. code-block:: sh
.. code-block:: bash

sudo cp /lib/systemd/system/mongod.service /etc/systemd/system/

#. Edit the ``/etc/systemd/system/mongod.service`` file, and
update the ``ExecStart`` statement to begin with:

.. code-block:: sh
.. code-block:: bash

/usr/bin/numactl --interleave=all

.. example::

If your existing ``ExecStart`` statement reads:

.. code-block:: sh
.. code-block:: bash
:copyable: false

ExecStart=/usr/bin/mongod --config /etc/mongod.conf

Update that statement to read:

.. code-block:: sh
.. code-block:: bash
:copyable: false

ExecStart=/usr/bin/numactl --interleave=all /usr/bin/mongod --config /etc/mongod.conf

#. Apply the change to ``systemd``:

.. code-block:: sh
.. code-block:: bash

sudo systemctl daemon-reload

#. Restart any running ``mongod`` instances:

.. code-block:: sh
.. code-block:: bash

sudo systemctl stop mongod
sudo systemctl start mongod
Expand All @@ -464,7 +464,7 @@ NUMA for use with MongoDB.
#. Configure each of your custom init scripts to start each
MongoDB instance via ``numactl``:

.. code-block:: sh
.. code-block:: bash

numactl --interleave=all <path> <options>

Expand All @@ -474,7 +474,7 @@ NUMA for use with MongoDB.

.. example::

.. code-block:: sh
.. code-block:: bash
:copyable: false

numactl --interleave=all /usr/local/bin/mongod -f /etc/mongod.conf
Expand Down Expand Up @@ -702,14 +702,14 @@ example:
- On :abbr:`RHEL (Red Hat Enterprise Linux)` / CentOS, the following
command updates the system-provided GNU C Library:

.. code-block:: sh
.. code-block:: bash

sudo yum update glibc

- On Ubuntu / Debian, the following command updates the system-provided
GNU C Library:

.. code-block:: sh
.. code-block:: bash

sudo apt-get install libc6

Expand Down Expand Up @@ -762,21 +762,21 @@ minimum. As such you should set ``vm.swappiness`` to either ``1`` or

- To check the current swappiness setting on your system, run:

.. code-block:: sh
.. code-block:: bash

cat /proc/sys/vm/swappiness

- To change swappiness on your system:

#. Edit the ``/etc/sysctl.conf`` file and add the following line:

.. code-block:: sh
.. code-block:: bash

vm.swappiness = 1

#. Run the following command to apply the setting:

.. code-block:: sh
.. code-block:: bash

sudo sysctl -p

Expand Down Expand Up @@ -865,7 +865,7 @@ Typically these messages do not require intervention; however, you can
use the following operations to determine the symbol versions that
:binary:`~bin.mongod` expects:

.. code-block:: sh
.. code-block:: bash

objdump -T <path to mongod>/mongod | grep " SSL_"
objdump -T <path to mongod>/mongod | grep " CRYPTO_"
Expand All @@ -882,7 +882,7 @@ The last two strings in this output are the symbol version and symbol
name. Compare these values with the values returned by the following
operations to detect symbol version mismatches:

.. code-block:: sh
.. code-block:: bash

objdump -T <path to TLS/SSL libs>/libssl.so.1*
objdump -T <path to TLS/SSL libs>/libcrypto.so.1*
Expand Down
12 changes: 6 additions & 6 deletions source/appendix/security/appendixA-openssl-ca.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ B. Generate the Test CA PEM File

#. Create the :red:`test` CA key file :file:`mongodb-test-ca.key`.

.. code-block:: sh
.. code-block:: bash

openssl genrsa -out mongodb-test-ca.key 4096

Expand All @@ -120,13 +120,13 @@ B. Generate the Test CA PEM File
generated key file. When asked for Distinguished Name values, enter
the appropriate values for your :red:`test` CA certificate.

.. code-block:: sh
.. code-block:: bash

openssl req -new -x509 -days 1826 -key mongodb-test-ca.key -out mongodb-test-ca.crt -config openssl-test-ca.cnf

#. Create the private key for the intermediate certificate.

.. code-block:: sh
.. code-block:: bash

openssl genrsa -out mongodb-test-ia.key 4096

Expand All @@ -141,20 +141,20 @@ B. Generate the Test CA PEM File
certificate. When asked for Distinguished Name values, enter the
appropriate values for your :red:`test` Intermediate Authority certificate.

.. code-block:: sh
.. code-block:: bash

openssl req -new -key mongodb-test-ia.key -out mongodb-test-ia.csr -config openssl-test-ca.cnf

#. Create the intermediate certificate :file:`mongodb-test-ia.crt`.

.. code-block:: sh
.. code-block:: bash

openssl x509 -sha256 -req -days 730 -in mongodb-test-ia.csr -CA mongodb-test-ca.crt -CAkey mongodb-test-ca.key -set_serial 01 -out mongodb-test-ia.crt -extfile openssl-test-ca.cnf -extensions v3_ca

#. Create the :red:`test` CA PEM file from the :red:`test` CA certificate :file:`mongod-test-ca.crt` and
:red:`test` intermediate certificate :file:`mongodb-test-ia.crt`.

.. code-block:: sh
.. code-block:: bash

cat mongodb-test-ca.crt mongodb-test-ia.crt > test-ca.pem

Expand Down
10 changes: 5 additions & 5 deletions source/appendix/security/appendixB-openssl-server.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ B. Generate the Test PEM File for Server

#. Create the :red:`test` key file :file:`mongodb-test-server1.key`.

.. code-block:: sh
.. code-block:: bash

openssl genrsa -out mongodb-test-server1.key 4096

Expand All @@ -152,19 +152,19 @@ B. Generate the Test PEM File for Server
exactly across the member certificates: Organization (``O``),
Organizational Unit (``OU``), the Domain Component (``DC``).

.. code-block:: sh
.. code-block:: bash

openssl req -new -key mongodb-test-server1.key -out mongodb-test-server1.csr -config openssl-test-server.cnf

#. Create the :red:`test` server certificate :file:`mongodb-test-server1.crt`.

.. code-block:: sh
.. code-block:: bash

openssl x509 -sha256 -req -days 365 -in mongodb-test-server1.csr -CA mongodb-test-ia.crt -CAkey mongodb-test-ia.key -CAcreateserial -out mongodb-test-server1.crt -extfile openssl-test-server.cnf -extensions v3_req

#. Create the :red:`test` PEM file for the server.

.. code-block:: sh
.. code-block:: bash

cat mongodb-test-server1.crt mongodb-test-server1.key > test-server1.pem

Expand Down Expand Up @@ -194,7 +194,7 @@ B. Generate the Test PEM File for Server
certificates, create a pkcs-12 file to add to Keychain Access
instead of a PEM file:

.. code-block:: sh
.. code-block:: bash

openssl pkcs12 -export -out test-server1.pfx -inkey mongodb-test-server1.key -in mongodb-test-server1.crt -certfile mongodb-test-ia.crt

Expand Down
10 changes: 5 additions & 5 deletions source/appendix/security/appendixC-openssl-client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ B. Generate the Test PEM File for Client

#. Create the :red:`test` key file :file:`mongodb-test-client.key`.

.. code-block:: sh
.. code-block:: bash

openssl genrsa -out mongodb-test-client.key 4096

Expand All @@ -116,19 +116,19 @@ B. Generate the Test PEM File for Client
Organization (O), the Organizational Unit (OU) or the Domain
Component (DC).

.. code-block:: sh
.. code-block:: bash

openssl req -new -key mongodb-test-client.key -out mongodb-test-client.csr -config openssl-test-client.cnf

#. Create the :red:`test` client certificate :file:`mongodb-test-client.crt`.

.. code-block:: sh
.. code-block:: bash

openssl x509 -sha256 -req -days 365 -in mongodb-test-client.csr -CA mongodb-test-ia.crt -CAkey mongodb-test-ia.key -CAcreateserial -out mongodb-test-client.crt -extfile openssl-test-client.cnf -extensions v3_req

#. Create the :red:`test` PEM file for the client.

.. code-block:: sh
.. code-block:: bash

cat mongodb-test-client.crt mongodb-test-client.key > test-client.pem

Expand Down Expand Up @@ -158,7 +158,7 @@ B. Generate the Test PEM File for Client
create a PKCS 12 file to add to Keychain Access instead of a PEM
file:

.. code-block:: sh
.. code-block:: bash

openssl pkcs12 -export -out test-client.pfx -inkey mongodb-test-client.key -in mongodb-test-client.crt -certfile mongodb-test-ia.crt

Expand Down
6 changes: 3 additions & 3 deletions source/core/inmemory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ To select the in-memory storage engine, specify:

For example, from the command line:

.. code-block:: sh
.. code-block:: bash

mongod --storageEngine inMemory --dbpath <path>

Expand Down Expand Up @@ -88,7 +88,7 @@ the :doc:`YAML configuration file </reference/configuration-options>`.
If a write operation would cause the data to exceed the specified
memory size, MongoDB returns with the error:

.. code-block:: sh
.. code-block:: bash

"WT_CACHE_FULL: operation would overflow cache"

Expand All @@ -108,7 +108,7 @@ To specify a new size, use the

Or use the command-line option :option:`--inMemorySizeGB <mongod --inMemorySizeGB>`:

.. code-block:: sh
.. code-block:: bash

mongod --storageEngine inMemory --dbpath <path> --inMemorySizeGB <newSize>

Expand Down
2 changes: 1 addition & 1 deletion source/core/replica-set-rollbacks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ By default, when a rollback occurs, MongoDB writes the rollback data to
``/var/log/mongodb/mongod.log``, you can use ``grep`` to
search for instances of ``"rollback file"`` in the log:

.. code-block:: sh
.. code-block:: bash

grep "rollback file" /var/log/mongodb/mongod.log

Expand Down
2 changes: 1 addition & 1 deletion source/core/retryable-writes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ MongoDB Drivers
To enable retryable writes in the :binary:`~bin.mongo` shell, use
the :option:`--retryWrites <mongo --retryWrites>` command line option:

.. code-block:: sh
.. code-block:: bash

mongo --retryWrites

Expand Down
6 changes: 3 additions & 3 deletions source/core/schema-validation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ validation with :ref:`other query operators
For example, the following example specifies validator rules using the
query expression:

.. code-block:: sh
.. code-block:: bash

db.createCollection( "contacts",
{ validator: { $or:
Expand Down Expand Up @@ -174,7 +174,7 @@ documents:
Issue the following command to add a validator to the ``contacts``
collection:

.. code-block:: sh
.. code-block:: bash

db.runCommand( {
collMod: "contacts",
Expand Down Expand Up @@ -262,7 +262,7 @@ However, since the ``validationAction`` is ``warn`` only, MongoDB only
logs the validation violation message and allows the operation to
proceed:

.. code-block:: sh
.. code-block:: bash

2017-12-01T12:31:23.738-05:00 W STORAGE [conn1] Document would fail validation collection: example.contacts2 doc: { _id: ObjectId('5a2191ebacbbfc2bdc4dcffc'), name: "Amanda", status: "Updated" }

Expand Down
Loading