Skip to content
Snippets Groups Projects
Commit f433a547 authored by Russ Allbery's avatar Russ Allbery
Browse files

Fix syslog PID file handling for newsyslog::messages::sa

A refactoring of base::newsyslog removed a variable that it was
assuming was set.
parent bfff39cc
No related branches found
No related tags found
No related merge requests found
......@@ -7,11 +7,18 @@ class base::newsyslog::messages::sa inherits base::newsyslog {
ensure => absent,
}
# Determine the PID file location for the HUP action in the default messages
# configuration. Red Hat uses syslogd and Debian uses rsyslogd.
case $::operatingsystem {
'redhat': { $pid_file = '/var/run/syslogd.pid' }
default: { $pid_file = '/var/run/rsyslogd.pid' }
}
# Rotate /var/log/messages into AFS and analyze it.
Base::Newsyslog::Config['messages'] {
frequency => "daily",
directory => "/var/log",
restart => "hup $messagesPIDFile",
restart => "hup ${pid_file}",
archive => "/afs/ir/service/clients/logs",
log_owner => "root",
log_group => "root",
......@@ -19,4 +26,4 @@ class base::newsyslog::messages::sa inherits base::newsyslog {
logs => [ "messages" ],
analyze => "/usr/bin/filter-syslog",
}
}
\ No newline at end of file
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment