Skip to content
This repository was archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dwerder committed Dec 11, 2013
2 parents c7a635d + 59d2032 commit 4de9c31
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions templates/debian_mongod-init.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ NAME=mongodb_<%= @mongod_instance %>
# http://docs.mongodb.org/manual/reference/configuration-options/
CONF="/etc/mongod_<%= @mongod_instance %>.conf"
DBPATH=`awk -F= '/^dbpath=/{print $2}' "$CONF"`
PIDFILE=<%= scope.lookupvar('mongodb::params::dbdir') %>/mongod_<%= @mongod_instance %>/mongod.pid
PIDFILE=<%= scope.lookupvar('mongodb::pidfilepath') %>/mongod_<%= @mongod_instance %>/mongod.pid
ENABLE_MONGODB=yes

# Handle NUMA access to CPUs (SERVER-3574)
Expand Down Expand Up @@ -89,8 +89,8 @@ DIETIME=10 # Time to wait for the server to die, in seconds
# let some servers to die gracefully and
# 'restart' will not work

DAEMONUSER=<%= scope.lookupvar('mongodb::params::run_as_user') %>
DAEMONGROUP=<%= scope.lookupvar('mongodb::params::run_as_group') %>
DAEMONUSER=<%= scope.lookupvar('mongodb::run_as_user') %>
DAEMONGROUP=<%= scope.lookupvar('mongodb::run_as_group') %>
DAEMON_OPTS=${DAEMON_OPTS:-"--config $CONF"}

set -e
Expand Down
4 changes: 2 additions & 2 deletions templates/debian_mongos-init.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ DIETIME=10 # Time to wait for the server to die, in seconds
# let some servers to die gracefully and
# 'restart' will not work

DAEMONUSER=<%= scope.lookupvar('mongodb::params::run_as_user') %>
DAEMONGROUP=<%= scope.lookupvar('mongodb::params::run_as_group') %>
DAEMONUSER=<%= scope.lookupvar('mongodb::run_as_user') %>
DAEMONGROUP=<%= scope.lookupvar('mongodb::run_as_group') %>
DAEMON_OPTS=${DAEMON_OPTS:-"--config $CONF"}

set -e
Expand Down
8 changes: 4 additions & 4 deletions templates/logrotate.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@
# Deleting MongoDB-generated files, and leaves the logrotate-files
# alone (as they are named mongodb.log.[0-9].gz).

<%= scope.lookupvar('mongodb::params::logdir') %>/*.log {
<%= scope.lookupvar('mongodb::logdir') %>/*.log {
daily
missingok
rotate <%= scope.lookupvar('mongodb::params::logrotatenumber') %>
rotate <%= scope.lookupvar('mongodb::logrotatenumber') %>
compress
delaycompress
notifempty
create 0640 <%= scope.lookupvar('mongodb::params::run_as_user') -%> <%= scope.lookupvar('mongodb::params::run_as_group') %>
create 0640 <%= scope.lookupvar('mongodb::run_as_user') -%> <%= scope.lookupvar('mongodb::run_as_group') %>
sharedscripts
postrotate
killall -SIGUSR1 mongod
killall -SIGUSR1 mongos
find <%= scope.lookupvar('mongodb::params::logdir') %> -type f -regex ".*\.\(log.[0-9].*-[0-9].*\)" -exec rm {} \;
find <%= scope.lookupvar('mongodb::logdir') %> -type f -regex ".*\.\(log.[0-9].*-[0-9].*\)" -exec rm {} \;
endscript
}
4 changes: 2 additions & 2 deletions templates/mongos.conf.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# !!! generated by puppet !!!
# mongos.conf

pidfilepath=<%= scope.lookupvar('mongodb::params::dbdir') %>/mongos_<%= @mongos_instance %>/mongos.pid
pidfilepath=<%= scope.lookupvar('mongodb::pidfilepath') %>/mongos_<%= @mongos_instance %>/mongos.pid

logpath=<%= scope.lookupvar('mongodb::params::logdir') %>/mongos_<%= @mongos_instance %>.log
logpath=<%= scope.lookupvar('mongodb::logdir') %>/mongos_<%= @mongos_instance %>.log

logappend=<%= @mongos_logappend %>

Expand Down
8 changes: 4 additions & 4 deletions templates/redhat_mongod-init.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# description: Mongo is a scalable, document-oriented database.
# processname: mongod
# config: /etc/mongod_<%= @mongod_instance %>.conf
# pidfile: <%= scope.lookupvar('mongodb::params::dbdir') %>/mongod_<%= @mongod_instance %>/mongod.pid
# pidfile: <%= scope.lookupvar('mongodb::pidfilepath') %>/mongod_<%= @mongod_instance %>/mongod.pid

. /etc/rc.d/init.d/functions

Expand All @@ -26,8 +26,8 @@ DBPATH=`awk -F= '/^dbpath=/{print $2}' "$CONFIGFILE"`
PIDFILE=`awk -F= '/^pidfilepath=/{print $2}' "$CONFIGFILE"`
mongod=${MONGOD-/usr/bin/mongod}

MONGO_USER=<%= scope.lookupvar('mongodb::params::run_as_user') %>
MONGO_GROUP=<%= scope.lookupvar('mongodb::params::run_as_group') %>
MONGO_USER=<%= scope.lookupvar('mongodb::run_as_user') %>
MONGO_GROUP=<%= scope.lookupvar('mongodb::run_as_group') %>

# Handle NUMA access to CPUs (SERVER-3574)
# This verifies the existence of numactl as well as testing that the command works
Expand Down Expand Up @@ -65,7 +65,7 @@ restart () {
start
}

ulimit -n <%= scope.lookupvar('mongodb::params::ulimit_nofiles') %>
ulimit -n <%= scope.lookupvar('mongodb::ulimit_nofiles') %>
RETVAL=0

case "$1" in
Expand Down
6 changes: 3 additions & 3 deletions templates/redhat_mongos-init.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ PIDFILE=`awk -F= '/^pidfilepath=/{print $2}' "$CONFIGFILE"`
DBPATH=`dirname $PIDFILE`
mongos=/usr/bin/mongos

MONGO_USER=<%= scope.lookupvar('mongodb::params::run_as_user') %>
MONGO_GROUP=<%= scope.lookupvar('mongodb::params::run_as_group') %>
MONGO_USER=<%= scope.lookupvar('mongodb::run_as_user') %>
MONGO_GROUP=<%= scope.lookupvar('mongodb::run_as_group') %>

start()
{
Expand All @@ -52,7 +52,7 @@ restart () {
start
}

ulimit -n <%= scope.lookupvar('mongodb::params::ulimit_nofiles') %>
ulimit -n <%= scope.lookupvar('mongodb::ulimit_nofiles') %>
RETVAL=0

case "$1" in
Expand Down

0 comments on commit 4de9c31

Please sign in to comment.