Lighttpd - logrotate problem



tomic

New Member
Hallo zusammen,

ich habe einen Debian Squeeze Server mit OpenVZ.
In "allen" virtuellen Servern habe ich lighttpd mit den folgenden Parametern manuell installiert:

# ./configure --prefix=/etc/lighttpd --with-pcre --with-zlib --with-bzip2 --with-mysql

Lighttpd läuft soweit auch rund, die folgende Fehlermeldung irritiert mich jedoch.

/etc/cron.daily/logrotate:
error: error running shared postrotate script for '/var/log/lighttpd/*.log '
run-parts: /etc/cron.daily/logrotate exited with return code 1
 
Last edited by a moderator:
Code:
/var/log/lighttpd/*.log {
        weekly
        missingok
        rotate 4
        compress
	delaycompress
        notifempty
        sharedscripts
        postrotate
             if [ -x /usr/sbin/invoke-rc.d ]; then \
                invoke-rc.d lighttpd reopen-logs > /dev/null 2>&1; \
             else \
                /etc/init.d/lighttpd reopen-logs > /dev/null 2>&1; \
             fi; \
        endscript
}

Dieses liegt unter /etc/logrotate.d/lighttpd

Ob es allerdings genau dieses Script ist, kann ich nicht beurteilen, habe bisher eben nur dieses gefunden. Wie komme ich dem Problem denn auf die Schliche? Schicke auch gerne weitere Logs auf Anfrage.

Die Datei /etc/cron.daily/logrotate
Code:
#!/bin/sh

test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf
 
Last edited by a moderator:
Code:
/var/log/lighttpd/*.log {
        weekly
        missingok
        rotate 4
        compress
	delaycompress
        notifempty
        sharedscripts
        postrotate
             if [ -x /usr/sbin/invoke-rc.d ]; then \
                invoke-rc.d lighttpd reopen-logs > /dev/null 2>&1; \
             else \
                /etc/init.d/lighttpd reopen-logs > /dev/null 2>&1; \
             fi; \
        endscript
}
Das letzte Backslash vor endscript ist falsch und gehört da nicht hin. Ich empfehle zusätzlich die Lektüre der Manpage zu logrotate.
 
Back
Top