Skip to content

Commit

Permalink
Merge pull request #108 from sjoeboo/revert-106-umask
Browse files Browse the repository at this point in the history
Revert "Allow setting of the umask for the consul daemon."
  • Loading branch information
EvanKrall committed Apr 14, 2015
2 parents e500563 + 99d5546 commit 0bbbea6
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion manifests/init.pp
Expand Up @@ -63,7 +63,6 @@
$watches = {},
$checks = {},
$acls = {},
$umask = '0022',
) inherits consul::params {

validate_bool($purge_config_dir)
Expand Down
2 changes: 1 addition & 1 deletion templates/consul.debian.erb
Expand Up @@ -56,7 +56,7 @@ do_start()
mkrundir
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --chuid $USER --background --make-pidfile --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --chuid $USER --background --make-pidfile <%= scope.lookupvar('consul::umask') %> -- \
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --chuid $USER --background --make-pidfile -- \
$DAEMON_ARGS \
|| return 2

Expand Down
1 change: 0 additions & 1 deletion templates/consul.launchd.erb
Expand Up @@ -5,7 +5,6 @@
<key>Label</key> <string>io.consul.daemon</string>
<key>UserName</key> <string><%= scope.lookupvar('consul::user') %></string>
<key>GroupName</key> <string><%= scope.lookupvar('consul::group') %></string>
<key>Umask</key> <string><%= scope.lookupvar('consul::umask') %></string>
<% if scope.lookupvar('consul::service_enable') %>
<key>Disabled</key> <false/>
<% else %>
Expand Down
1 change: 0 additions & 1 deletion templates/consul.sles.erb
Expand Up @@ -36,7 +36,6 @@ case "$1" in
echo -n "Starting consul "
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
umask <%= scope.lookupvar('consul::umask') %>
startproc $CONSUL_BIN agent -config-dir "$CONFIG_DIR" <%= scope.lookupvar('consul::extra_options') %> >> "$LOG_FILE"

# Remember status and be verbose
Expand Down
1 change: 0 additions & 1 deletion templates/consul.systemd.erb
Expand Up @@ -6,7 +6,6 @@ After=basic.target network.target
[Service]
User=<%= scope.lookupvar('consul::user') %>
Group=<%= scope.lookupvar('consul::group') %>
Umask=<%= scope.lookupvar('consul::umask') %>
ExecStart=<%= scope.lookupvar('consul::bin_dir') %>/consul agent \
-config-dir <%= scope.lookupvar('consul::config_dir') %> <%= scope.lookupvar('consul::extra_options') %>
ExecReload=/bin/kill -HUP $MAINPID
Expand Down
2 changes: 1 addition & 1 deletion templates/consul.sysv.erb
Expand Up @@ -52,7 +52,7 @@ start() {
mkrundir
[ -f $PID_FILE ] && rm $PID_FILE
daemon --user=<%= scope.lookupvar('consul::user') %> \
--pidfile="$PID_FILE" --umask=<%= scope.lookupvar('consul::umask') %> \
--pidfile="$PID_FILE" \
"$CONSUL" agent -pid-file "${PID_FILE}" -config-dir "$CONFIG" <%= scope.lookupvar('consul::extra_options') %> >> "$LOG_FILE" &
retcode=$?
touch /var/lock/subsys/consul
Expand Down
1 change: 0 additions & 1 deletion templates/consul.upstart.erb
Expand Up @@ -6,7 +6,6 @@ stop on runlevel [06]
env CONSUL=<%= scope.lookupvar('consul::bin_dir') %>/consul
env CONFIG=<%= scope.lookupvar('consul::config_dir') %>

umask <%= scope.lookupvar('consul::umask') %>

script
# read settings like GOMAXPROCS from "/etc/default/consul", if available.
Expand Down

0 comments on commit 0bbbea6

Please sign in to comment.