Loading ...
Sorry, an error occurred while loading the content.

3755WatchDog and logrotate

Expand Messages
  • Joey
    Feb 3, 2006
      Stats:
      Unslung-5.5-beta
      root@machine ~> uname -a
      Linux greta 2.4.22-xfs #1 Sun Jun 12 21:17:17 PDT 2005 armv5b unknown

      Issue:
      I've installed logrotate and edited the default WatchDog files however
      WatchDog still appears to be moving /var/log/messages to
      /var/log/message.old (or is there some other process I'm not seeing)
      so logrotate is not getting an opportunity to run. This has been
      setup for over a week without any change. NOTE: /usr/sbin/WatchDog
      and /initrc/usr/sbin/WatchDog are identical. Also I have not
      restarted my slug since I've done these changes in the event that
      would make a difference. Please don't respond with just restarting to
      see if it will work without offering some explanation as to how that
      would fix the problem as I prefer to do things in a more production
      manner _if_ possible plus I'd enjoy learning why this helps (as
      opposed to windows where it just needs a quick break/reboot for
      assistance).

      Outputs:
      root@machine ~> find / -iname "*WatchDog*"
      /usr/sbin/WatchDog
      /initrd/usr/sbin/WatchDog

      root@machine ~> cat /usr/sbin/WatchDog
      #!/bin/sh
      MSN="msn_enable"
      DS_CONF="/etc/CGI_ds.conf"
      THTTPD_ID=`/bin/pidof thttpd`

      if [ "$(grep ${MSN} ${DS_CONF} | cut -d= -f2 | sed s/' '//g)" = "yes"
      ]; then
      if [ "$(pidof nmbd)" = "" ]; then
      /usr/sbin/nmbd -D
      fi
      if [ "$(pidof smbd)" = "" ]; then
      /usr/sbin/smbd -D
      fi
      fi

      if [ -z $THTTPD_ID ];then
      /usr/sbin/thttpd -C /etc/thttpd.conf
      fi

      /bin/rm -f /var/log/samba/*.old &>/dev/null

      root@machine ~> cat /etc/crontab
      SHELL=/bin/sh
      PATH=/sbin:/bin:/usr/sbin:/usr/bin
      MAILTO=""
      HOME=/
      # ---------- ---------- Default is Empty ---------- ---------- #
      0 0-23/8 * * * root /usr/sbin/CheckDiskFull &>/dev/null
      0 0 * * * root /usr/sbin/WatchDog &>/dev/null
      1 * * * * root /opt/bin/ntpclient -s -l -h 0.pool.ntp.org >>
      /opt/var/log/ntp.log && hwclock --systohc --utc
      30 2,14 * * * root /unslung/webalizer-update &>/dev/null
    • Show all 4 messages in this topic