Advertisement
pveselov

/etc/init/mongocs.conf

Mar 26th, 2015
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. # Ubuntu upstart file at /etc/init/mongod.conf
  2.  
  3. # Recommended ulimit values for mongod or mongos
  4. # See http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
  5. #
  6. limit fsize unlimited unlimited
  7. limit cpu unlimited unlimited
  8. limit as unlimited unlimited
  9. limit nofile 64000 64000
  10. limit rss unlimited unlimited
  11. limit nproc 32000 32000
  12.  
  13. kill timeout 300 # wait 300s between SIGTERM and SIGKILL.
  14.  
  15. pre-start script
  16. DAEMONUSER=${DAEMONUSER:-mongodb}
  17. touch /var/run/mongocs.pid
  18. chown $DAEMONUSER /var/run/mongocs.pid
  19. end script
  20.  
  21. start on runlevel [2345]
  22. stop on runlevel [06]
  23.  
  24. script
  25. ENABLE_MONGOD="yes"
  26. DAEMON=/usr/bin/mongod
  27. DAEMONUSER=${DAEMONUSER:-mongodb}
  28.  
  29. if [ -f /etc/default/mongod ]; then . /etc/default/mongod; fi
  30.  
  31. # Handle NUMA access to CPUs (SERVER-3574)
  32. # This verifies the existence of numactl as well as testing that the command works
  33. NUMACTL_ARGS="--interleave=all"
  34. if which numactl >/dev/null 2>/dev/null && numactl $NUMACTL_ARGS ls / >/dev/null 2>/dev/null
  35. then
  36. NUMACTL="$(which numactl) -- $NUMACTL_ARGS"
  37. DAEMON_OPTS=${DAEMON_OPTS:-"--configsvr --dbpath /mnt/mongo/confsrv --logpath /mnt/mongo/logs/mongocs.log --logappend"}
  38. else
  39. NUMACTL=""
  40. DAEMON_OPTS="-- "${DAEMON_OPTS:-"--configsvr --dbpath /mnt/mongo/confsrv --logpath /mnt/mongo/logs/mongocs.log --logappend"}
  41. fi
  42.  
  43. if [ "x$ENABLE_MONGOD" = "xyes" ]
  44. then
  45. exec start-stop-daemon --start \
  46. --chuid $DAEMONUSER \
  47. --pidfile /var/run/mongocs.pid \
  48. --make-pidfile \
  49. --exec $NUMACTL $DAEMON $DAEMON_OPTS
  50. fi
  51. end script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement