Added syslog's all.log rotation for OpenBSD
This commit is contained in:
parent
6f17fb9013
commit
09084c977e
2 changed files with 14 additions and 1 deletions
|
@ -46,6 +46,13 @@ class syslog::common {
|
|||
content => template("syslog/logrotate.erb"),
|
||||
}
|
||||
}
|
||||
"openbsd": {
|
||||
exec { "add-newsyslog-all":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
command => "echo '/var/log/all.log root:${group} 640 7 * \$D0 Z' >> /etc/newsyslog.conf",
|
||||
unless => "grep -q '^/var/log/all.log' /etc/newsyslog.conf",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -211,6 +218,12 @@ class syslog::common::standalone inherits syslog::common {
|
|||
ensure => absent,
|
||||
}
|
||||
}
|
||||
"openbsd": {
|
||||
Exec["add-newsyslog-all"] {
|
||||
# never run this
|
||||
unless => "true",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
file { "/usr/local/sbin/logarchiver.sh":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue