-
-
Save Om4ar/64884d78dbc051b2e21fac0541137fc1 to your computer and use it in GitHub Desktop.
MongoDB systemd service unit configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=MongoDB Database Service | |
| Wants=network.target | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| PermissionsStartOnly=true | |
| ExecStartPre=/bin/mkdir -p /var/lib/mongodb | |
| ExecStartPre=/bin/chown mongodb:mongodb /var/lib/mongodb | |
| ExecStart=/usr/bin/mongod --config /etc/mongod.conf | |
| ExecReload=/bin/kill -HUP $MAINPID | |
| Restart=always | |
| User=mongodb | |
| Group=mongodb | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment