summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/service.pp8
-rw-r--r--templates/logger_run.erb2
2 files changed, 5 insertions, 5 deletions
diff --git a/manifests/service.pp b/manifests/service.pp
index 85a7ec5..15b3460 100644
--- a/manifests/service.pp
+++ b/manifests/service.pp
@@ -18,16 +18,16 @@ define runit::service (
# logging stuff
$logger = true, # shall we setup an logging service; if you use 'command' before,
# all output from command will be logged automatically to $logdir/current
- $_logdir = undef,
+ $logdir = undef,
$timeout = 7 # service restart/stop timeouts (only relevant for 'enabled' services)
) {
# using the following construct, because '$logdir = "${rundir}/log"' in the
# define statement produces compilation warnings
- if $_logdir == undef {
- $logdir = "${rundir}/log"
+ if $logdir == undef {
+ $_logdir = "${rundir}/log"
} else {
- $logdir = $_logdir
+ $_logdir = $logdir
}
# FixMe: Validate parameters
diff --git a/templates/logger_run.erb b/templates/logger_run.erb
index f85bf79..5c0a30b 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}"