Public bug reported:

I frequently get the following error from logrotate on some of my 12.04
LTS machines.

 /etc/cron.daily/logrotate:
 logrotate_script: line 1: kill: (1660) - No such process
 error: error running non-shared postrotate script for 
/var/log/samba/log.winbindd of '/var/log/samba/log.winbindd '
 run-parts: /etc/cron.daily/logrotate exited with return code 1

/etc/logrotate.d/winbind has the default content shown below.
The kill command returns an error if for whatever reason the PID listed in 
/var/run/samba/winbindd.pid is not running.

Thus the kill line should be improved to something like
  [ -f /var/run/samba/winbind.pid ]  && { PID=$(cat 
/var/run/samba/winbindd.pid) ; ps -p $PID | grep -q $PID && kill -HUP $PID ; }

/var/log/samba/log.winbindd {
        weekly
        missingok
        rotate 7
        postrotate
        [ ! -f /var/run/samba/winbindd.pid ] || kill -HUP `cat 
/var/run/samba/winbindd.pid`
        endscript
        compress
        notifempty
}

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1325821

Title:
  logrotate error on rotating winbind

Status in “linux” package in Ubuntu:
  New

Bug description:
  I frequently get the following error from logrotate on some of my
  12.04 LTS machines.

   /etc/cron.daily/logrotate:
   logrotate_script: line 1: kill: (1660) - No such process
   error: error running non-shared postrotate script for 
/var/log/samba/log.winbindd of '/var/log/samba/log.winbindd '
   run-parts: /etc/cron.daily/logrotate exited with return code 1

  /etc/logrotate.d/winbind has the default content shown below.
  The kill command returns an error if for whatever reason the PID listed in 
/var/run/samba/winbindd.pid is not running.

  Thus the kill line should be improved to something like
    [ -f /var/run/samba/winbind.pid ]  && { PID=$(cat 
/var/run/samba/winbindd.pid) ; ps -p $PID | grep -q $PID && kill -HUP $PID ; }

  /var/log/samba/log.winbindd {
          weekly
          missingok
          rotate 7
          postrotate
          [ ! -f /var/run/samba/winbindd.pid ] || kill -HUP `cat 
/var/run/samba/winbindd.pid`
          endscript
          compress
          notifempty
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1325821/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to