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"),
|
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,
|
ensure => absent,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
"openbsd": {
|
||||||
|
Exec["add-newsyslog-all"] {
|
||||||
|
# never run this
|
||||||
|
unless => "true",
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "/usr/local/sbin/logarchiver.sh":
|
file { "/usr/local/sbin/logarchiver.sh":
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/var/log/all.log {
|
/var/log/all.log {
|
||||||
create 0640 root <%= syslog_group %>
|
create 0640 root <%= group %>
|
||||||
postrotate
|
postrotate
|
||||||
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
|
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
|
||||||
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
|
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
|
||||||
|
|
Loading…
Add table
Reference in a new issue