]> gitweb.fluxo.info Git - puppet-runit.git/commitdiff
quoting paths
authorMarkus Strauss <Markus@ITstrauss.eu>
Tue, 28 Feb 2012 01:28:50 +0000 (02:28 +0100)
committerMarkus Strauss <Markus@ITstrauss.eu>
Tue, 28 Feb 2012 01:28:50 +0000 (02:28 +0100)
manifests/service/enabled.pp
templates/logger_run.erb
templates/run.erb

index 234d3ab5b3e964c66698a40ab3b697468c538f9b..3808585b72b2fda1fff81ba961351dbc48865f0d 100644 (file)
@@ -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}'",
     }
index 5c0a30b0c6f1e952815e74eede108a14b920c484..55728dd4026c18e6c59b4ee2ab9d2c1803092e54 100644 (file)
@@ -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}"
index d8c1a81271f417933b41fd20a83a6cc60b4d1753..dafc07ab2f180cb54ccb2c3e9841ae9d87953428 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/bash
-envdir=<%= svbase %>/env
+envdir="<%= svbase %>/env"
 root=<%= rundir %>
 echo "Starting <%= name %> from ${root}"
 cd $root