本文主要是介绍mongodb自启动脚本.md,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
可粘贴文本(不全):
#!/bin/sh
#
#chkconfig: 2345 80 90
#description:mongodb
#processname:mongodbif test -f /sys/kernel/mm/transparent_hugepage/enabled; thenecho never > /sys/kernel/mm/transparent_hugepage/enabled
fi
if test -f /sys/kernel/mm/transparent_hugepage/defrag; thenecho never > /sys/kernel/mm/transparent_hugepage/defrag
fistart() {/home/mongod/mongodb/bin/mongod -f /home/mongod/mongodb/mongo.conf
}stop() {/home/mongod/mongodb/bin/mongod -f /home/mongod/mongodb/mongo.conf --shutdown
}case "$1" instart)start;;stop)stop;;restart)stopstart;;*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
来源: http://blog.csdn.net/jiakg/article/details/51474627
这篇关于mongodb自启动脚本.md的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!