2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

Modify logrotate conf file to reduce log missing

This commit is contained in:
cxhong 2019-12-12 08:34:59 -05:00
parent c21218129e
commit 929b9fe804
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