[Unit] Description=mongodb After=network.target remote-fs.target nss-lookup.target [Service] Type=forking PIDFile=/mongodb_data/data/mongod.lock ExecStart=/usr/local/mongodb/mongod --dbpath=/mongodb_data/data/ --logpath=/mongodb_data/log/mongodb.log --logappend --fork ExecReload=/bin/kill -s HUP $MAINPID ExecStop=/bin/kill -s QUIT $MAINPID PrivateTmp=true [Install] WantedBy=multi-user.target (责任编辑:IT) |