Portál AbcLinuxu, 11. května 2025 05:07
nedaří se mi stále najít kde mám chybu v konfiguraci logrotate, můžete mě někdo poradit?
hláška v logu:
/etc/cron.daily/logrotate: error: syslog:9 duplicate log entry for /var/log/cron error: found error in /var/log/cron /var/log/debug /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler /var/log/syslog , skipping
...............................................
obsah logrotate:
#!/bin/sh /usr/sbin/logrotate /etc/logrotate.conf EXITVALUE=$? if [ $EXITVALUE != 0 ]; then /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" fi exit 0
vypadá to že v souboru syslog je ta chyba
originál syslog:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
sharedscripts
postrotate
/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
endscript
}
/var/log/cron /var/log/debug /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler /var/log/syslog {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || true
/PATH_TO/rc.sendmailanalyzer restart >/dev/null 2>&1 || true
# or /etc/rc.init.d/sendmailanalyzer restart >/dev/null 2>&1 || true
endscript
}
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
co přesně bych měl odstranit?
/var/log/cron /var/log/debug /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler /var/log/syslog /var/log/boot.log { sharedscripts postrotate /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 /PATH_TO/rc.sendmailanalyzer restart >/dev/null 2>&1 || true # or /etc/rc.init.d/sendmailanalyzer restart >/dev/null 2>&1 || true endscript }
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.