[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
时间: 2024-10-08 22:15:48