2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00

Merge pull request #6510 from cxhong/logrotate

Modify logrotate conf file to reduce log missing
This commit is contained in:
Mark Gurevich 2019-12-16 09:17:15 -05:00 committed by GitHub
commit 0caee6bf14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,8 @@
{
missingok
sharedscripts
copytruncate
delaycompress
postrotate
kill -HUP `systemctl show -p MainPID goconserver.service 2> /dev/null |awk -F= '{print $2}'` 2> /dev/null || true
endscript

View File

@ -1,6 +1,8 @@
/var/log/xcat/*.log {
missingok
sharedscripts
copytruncate
delaycompress
postrotate
test -f /var/run/rsyslogd.pid && kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
test -f /var/run/syslogd.pid && kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true