diff options
author | Markus Strauss <Markus@ITstrauss.eu> | 2012-02-28 02:28:50 +0100 |
---|---|---|
committer | Markus Strauss <Markus@ITstrauss.eu> | 2012-02-28 02:28:50 +0100 |
commit | fcc55c844e0dbe207c45c491fdf50e23ce7062be (patch) | |
tree | 0a8226257e7d053365ebc6e6f1534376cc47809d | |
parent | 970bd1cdab842aabda585aa99ed5f5ddb164336d (diff) | |
download | puppet-runit-fcc55c844e0dbe207c45c491fdf50e23ce7062be.tar.gz puppet-runit-fcc55c844e0dbe207c45c491fdf50e23ce7062be.tar.bz2 |
quoting paths
-rw-r--r-- | manifests/service/enabled.pp | 6 | ||||
-rw-r--r-- | templates/logger_run.erb | 2 | ||||
-rw-r--r-- | templates/run.erb | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/manifests/service/enabled.pp b/manifests/service/enabled.pp index 234d3ab..3808585 100644 --- a/manifests/service/enabled.pp +++ b/manifests/service/enabled.pp @@ -22,9 +22,9 @@ define runit::service::enabled( $ensure = present, $timeout ) { exec { "sv restart ${name}": subscribe => File["/etc/service/${name}"], # last command is true, so this resource never fails - command => "/usr/bin/sv -w ${timeout} force-restart /etc/sv/${name}; true", + command => "/usr/bin/sv -w ${timeout} force-restart '/etc/sv/${name}'; true", # we desperately need the supervise directory to restart a service - onlyif => "/usr/bin/test -d '/etc/sv/${name}'/supervise", + onlyif => "/usr/bin/test -d '/etc/sv/${name}/supervise'", refreshonly => true, } @@ -41,7 +41,7 @@ define runit::service::enabled( $ensure = present, $timeout ) { before => File["/etc/sv/${name}"], # we wait a few seconds just in case this is the firstmost service activation # then the supervise directory need to be created (automically) by runit - command => "/usr/bin/sv -w ${timeout} force-shutdown /etc/sv/${name}; true", + command => "/usr/bin/sv -w ${timeout} force-shutdown '/etc/sv/${name}'; true", # when "/etc/sv/${name}" is not there, do not exec onlyif => "/usr/bin/test -d '/etc/sv/${name}'", } diff --git a/templates/logger_run.erb b/templates/logger_run.erb index 5c0a30b..55728dd 100644 --- a/templates/logger_run.erb +++ b/templates/logger_run.erb @@ -1,5 +1,5 @@ #!/bin/sh -logdir=<%= _logdir %> +logdir="<%= _logdir %>" mkdir -p "${logdir}" chown <%= user %>:<%= group %> "${logdir}" exec chpst -u <%= user %>:<%= group %> svlogd -tt "${logdir}" diff --git a/templates/run.erb b/templates/run.erb index d8c1a81..dafc07a 100644 --- a/templates/run.erb +++ b/templates/run.erb @@ -1,5 +1,5 @@ #!/bin/bash -envdir=<%= svbase %>/env +envdir="<%= svbase %>/env" root=<%= rundir %> echo "Starting <%= name %> from ${root}" cd $root |