Skip to content

Commit

Permalink
Merge pull request #175 from nperron/bug_3603/int/logrotate_let_empty…
Browse files Browse the repository at this point in the history
…_files

Fixes #3603 - Add reload of rsyslog after logrotate of reports and LDAP log and add specific logrotate file for RHEL/CentOS
  • Loading branch information
Nicolas PERRON committed Aug 27, 2013
2 parents b5ff338 + 7c99643 commit 7f104c8
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 19 deletions.
41 changes: 28 additions & 13 deletions techniques/system/distributePolicy/1.0/logrotate.debian.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
missingok
rotate 30
compress
notifempty
create 640 root adm
notifempty
create 640 root adm
sharedscripts
postrotate
if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d apache2 reload > /dev/null
else
/etc/init.d/apache2 reload > /dev/null
fi
fi
endscript
if [ -f "`. /etc/apache2/envvars ; echo ${APACHE_PID_FILE:-/var/run/apache2.pid}`" ]; then
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d apache2 reload > /dev/null
else
/etc/init.d/apache2 reload > /dev/null
fi
fi
endscript
}

/var/log/rudder/ldap/slapd.log {
Expand All @@ -23,7 +23,14 @@
rotate 30
compress
notifempty
create 640 root adm
create 640 root adm
postrotate
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d rsyslog reload > /dev/null
else
/etc/init.d/rsyslog reload > /dev/null
fi
endscript
}

/var/log/rudder/reports/*.log {
Expand All @@ -32,7 +39,15 @@
rotate 30
compress
notifempty
create 640 root adm
create 640 root adm
sharedscripts
postrotate
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d rsyslog reload > /dev/null
else
/etc/init.d/rsyslog reload > /dev/null
fi
endscript
}

/var/log/rudder/core/*.log {
Expand All @@ -41,5 +56,5 @@
rotate 30
compress
notifempty
create 640 root adm
create 640 root adm
}
46 changes: 46 additions & 0 deletions techniques/system/distributePolicy/1.0/logrotate.rhel.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/var/log/rudder/apache2/*.log {
daily
missingok
rotate 30
compress
notifempty
create 640 root root
sharedscripts
postrotate
/etc/init.d/apache2 reload > /dev/null
endscript
}

/var/log/rudder/ldap/slapd.log {
daily
missingok
rotate 30
compress
notifempty
create 640 root root
postrotate
/etc/init.d/rsyslog reload > /dev/null
endscript
}

/var/log/rudder/reports/*.log {
daily
missingok
rotate 30
compress
notifempty
create 640 root root
sharedscripts
postrotate
/etc/init.d/rsyslog reload > /dev/null
endscript
}

/var/log/rudder/core/*.log {
daily
missingok
rotate 30
compress
notifempty
create 640 root root
}
19 changes: 13 additions & 6 deletions techniques/system/distributePolicy/1.0/logrotate.suse.st
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
missingok
rotate 30
compress
notifempty
create 640 root root
notifempty
create 640 root root
sharedscripts
postrotate
/etc/init.d/apache2 reload > /dev/null
endscript
/etc/init.d/apache2 reload > /dev/null
endscript
}

/var/log/rudder/ldap/slapd.log {
Expand All @@ -17,7 +17,10 @@
rotate 30
compress
notifempty
create 640 root root
create 640 root root
postrotate
/etc/init.d/syslog reload > /dev/null
endscript
}

/var/log/rudder/reports/*.log {
Expand All @@ -26,7 +29,11 @@
rotate 30
compress
notifempty
create 640 root root
create 640 root root
sharedscripts
postrotate
/etc/init.d/syslog reload > /dev/null
endscript
}

/var/log/rudder/core/*.log {
Expand Down

0 comments on commit 7f104c8

Please sign in to comment.