Package: thttpd
Version: 2.23beta1-5
Severity: normal
Tags: patch

The postrotate script in /etc/logrotate.d/thttpd doesn't check if the thttpd
daemon is already running. The result is the thttpd daemon always being
started after the log rotation.

The daemon may have been stopped manually for some reason, it shouldn't be
restarted blindly.

The /etc/logrotate.d/thttpd script below fixes this problem...

/var/log/thttpd.log {
    rotate 14
    daily
    compress
    missingok
    delaycompress
    postrotate
        if [ -f /var/run/thttpd.pid ]; then
            if ps -p `cat /var/run/thttpd.pid` > /dev/null; then
                invoke-rc.d thttpd restart > /dev/null 2>&1
            fi
        fi
    endscript
}



-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-amd64
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages thttpd depends on:
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  logrotate                    3.7.1-3     Log rotation utility

thttpd recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to