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,
}
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}'",
}