Whoops.  I had the wrong directory being passed to dspam_logrotate.  It
should take DSPAM home.

#!/bin/sh
#
# Rotate DSPAM's data files as suggested by the DSPAM documentation.

DSPAMCONF=/etc/dspam/dspam.conf
DSPAMHOME="`grep -i "^Home" $DSPAMCONF | awk '{print $2}'`"

if [ -n "$DSPAMHOME" -a -e "$DSPAMHOME" ]; then
  SYSTEMLOG="`grep -i "^SystemLog" $DSPAMCONF | awk '{print $2}' | tr 
'[:upper:]' '[:lower:]'`"
  USERLOG="`grep -i "^UserLog" $DSPAMCONF | awk '{print $2}' | tr '[:upper:]' 
'[:lower:]'`"

  if [ "$SYSTEMLOG" = "on" -o "$USERLOG" = "on" ]; then
    if [ -x /usr/bin/dspam_logrotate ]; then
      /usr/bin/dspam_logrotate -a 45 -d "$DSPAMHOME"
    fi
  fi
fi

exit 0

-- 
dspam Package does not contain cron'ed execution of dspam_logrotate.
https://bugs.launchpad.net/bugs/111640
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to