mongodb.service for Systemd

Tested only on Fedora 19

File /etc/systemd/system/mongodb.service contents:

[Unit]
Description=Mongo is a scalable, document-oriented database.
After=syslog.target network.target

[Service]
Type=forking
ExecStart=/usr/bin/mongod $OPTIONS run
User=mongod
Group=mongod
EnvironmentFile=/etc/sysconfig/mongod
# comment out if dbpath and/or pidfilepath (/etc/mongod.conf)
# are set in /var/*/* (by default)
#NoNewPrivileges=yes
#PIDFile=/var/run/mongod.pid

[Install]
WantedBy=multi-user.target

File /etc/sysconfig/mongod contents:

# TODO: add relevant configuration stuff here.
OPTIONS="--quiet -f /etc/mongod.conf"

Enable autostart

# systemctl enable mongodb