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

Commit 4de9c31

Browse files
committed
2 parents c7a635d + 59d2032 commit 4de9c31

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

templates/debian_mongod-init.conf.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ NAME=mongodb_<%= @mongod_instance %>
5757
# http://docs.mongodb.org/manual/reference/configuration-options/
5858
CONF="/etc/mongod_<%= @mongod_instance %>.conf"
5959
DBPATH=`awk -F= '/^dbpath=/{print $2}' "$CONF"`
60-
PIDFILE=<%= scope.lookupvar('mongodb::params::dbdir') %>/mongod_<%= @mongod_instance %>/mongod.pid
60+
PIDFILE=<%= scope.lookupvar('mongodb::pidfilepath') %>/mongod_<%= @mongod_instance %>/mongod.pid
6161
ENABLE_MONGODB=yes
6262

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

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

9696
set -e

templates/debian_mongos-init.conf.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ DIETIME=10 # Time to wait for the server to die, in seconds
7777
# let some servers to die gracefully and
7878
# 'restart' will not work
7979

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

8484
set -e

templates/logrotate.conf.erb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
# Deleting MongoDB-generated files, and leaves the logrotate-files
66
# alone (as they are named mongodb.log.[0-9].gz).
77

8-
<%= scope.lookupvar('mongodb::params::logdir') %>/*.log {
8+
<%= scope.lookupvar('mongodb::logdir') %>/*.log {
99
daily
1010
missingok
11-
rotate <%= scope.lookupvar('mongodb::params::logrotatenumber') %>
11+
rotate <%= scope.lookupvar('mongodb::logrotatenumber') %>
1212
compress
1313
delaycompress
1414
notifempty
15-
create 0640 <%= scope.lookupvar('mongodb::params::run_as_user') -%> <%= scope.lookupvar('mongodb::params::run_as_group') %>
15+
create 0640 <%= scope.lookupvar('mongodb::run_as_user') -%> <%= scope.lookupvar('mongodb::run_as_group') %>
1616
sharedscripts
1717
postrotate
1818
killall -SIGUSR1 mongod
1919
killall -SIGUSR1 mongos
20-
find <%= scope.lookupvar('mongodb::params::logdir') %> -type f -regex ".*\.\(log.[0-9].*-[0-9].*\)" -exec rm {} \;
20+
find <%= scope.lookupvar('mongodb::logdir') %> -type f -regex ".*\.\(log.[0-9].*-[0-9].*\)" -exec rm {} \;
2121
endscript
2222
}

templates/mongos.conf.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# !!! generated by puppet !!!
22
# mongos.conf
33

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

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

88
logappend=<%= @mongos_logappend %>
99

templates/redhat_mongod-init.conf.erb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# description: Mongo is a scalable, document-oriented database.
88
# processname: mongod
99
# config: /etc/mongod_<%= @mongod_instance %>.conf
10-
# pidfile: <%= scope.lookupvar('mongodb::params::dbdir') %>/mongod_<%= @mongod_instance %>/mongod.pid
10+
# pidfile: <%= scope.lookupvar('mongodb::pidfilepath') %>/mongod_<%= @mongod_instance %>/mongod.pid
1111

1212
. /etc/rc.d/init.d/functions
1313

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

29-
MONGO_USER=<%= scope.lookupvar('mongodb::params::run_as_user') %>
30-
MONGO_GROUP=<%= scope.lookupvar('mongodb::params::run_as_group') %>
29+
MONGO_USER=<%= scope.lookupvar('mongodb::run_as_user') %>
30+
MONGO_GROUP=<%= scope.lookupvar('mongodb::run_as_group') %>
3131

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

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

7171
case "$1" in

templates/redhat_mongos-init.conf.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ PIDFILE=`awk -F= '/^pidfilepath=/{print $2}' "$CONFIGFILE"`
2525
DBPATH=`dirname $PIDFILE`
2626
mongos=/usr/bin/mongos
2727

28-
MONGO_USER=<%= scope.lookupvar('mongodb::params::run_as_user') %>
29-
MONGO_GROUP=<%= scope.lookupvar('mongodb::params::run_as_group') %>
28+
MONGO_USER=<%= scope.lookupvar('mongodb::run_as_user') %>
29+
MONGO_GROUP=<%= scope.lookupvar('mongodb::run_as_group') %>
3030

3131
start()
3232
{
@@ -52,7 +52,7 @@ restart () {
5252
start
5353
}
5454

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

5858
case "$1" in

0 commit comments

Comments
 (0)