Re: Starting fetchmail in daemon mode from cron
From: Night Owl (Night.Owl_at_dark.scary.night.nodomain)
Date: 07/15/05
- Next message: Richard Polhill: "Re: Starting fetchmail in daemon mode from cron"
- Previous message: The Master: "test"
- In reply to: Night Owl: "Starting fetchmail in daemon mode from cron"
- Next in thread: Richard Polhill: "Re: Starting fetchmail in daemon mode from cron"
- Reply: Richard Polhill: "Re: Starting fetchmail in daemon mode from cron"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 14 Jul 2005 19:10:28 -0400
Ok guys. I'm starting to get desperate. <g>
Nobody has stepped forward with any questions or suggestions, so I
guess I may have posted this to the wrong groups. I would appreciate
a suggestion on where I can take this to get some help.
Thank you!
On Tue, 12 Jul 2005 22:49:51 -0400, Night Owl
<Night.Owl@dark.scary.night.nodomain> wrote:
>Cross posted: comp.os.linux.admin,comp.os.linux,alt.os.linux
>
>I'd appreciate some help with the following:
>
>I'm trying to get fetchmail tweaked to poll based on usage conditions:
>
>- users logged on to their IMAP store = poll very frequently,
>providing a "near realtime" experience (accounts for about 2
>hours/day)
>- no users logged on toe their IMAP store = poll occasionally
>
>My intent is to have the cron script fire once every 5 minutes and, if
>needed, tweak fetchmail's daemon mode by unloading / re-loading the
>fetchmail process. I think that this is a better approach than
>running the script every minute and manually polling when appropriate
>(in case you wonder why I choose one approach over the other).
>
>The script works fine from a command line in that it kills the running
>process as needed and re-loads fetchmail with the appropriate command
>line parameters.
>
>Calling it from cron is a different story, however. The script fires
>and will kill the fetchmail process but won't start up a new one. For
>simplicity sake, I have boiled down the script to a few essentials for
>testing purposes.
>
>I can't figure this one out and would really appreciate your help.
>
>Here are the details:
>
># 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 /usr/sbin/hwclock -s &>/dev/null
>*/5 * * * * root /myscripts/fetchmailcustom
>#
>
># ls -all /myscripts
>drwxr-xr-x 2 root root 4096 Jul 10 11:10 .
>drwxrwxr-x 24 admin everyone 4096 Jul 7 22:01 ..
>-rwxr-xr-x 1 root root 217 Jul 10 11:07 fetchmailcustom
>-rw-r--r-- 1 root root 0 Jul 10 12:12
>fetchmailcustom.imap
>-rwxr-xr-x 1 root root 1895 Jul 10 11:06 fmbackup
>#
>
>#!/bin/sh
>/bin/killall fetchmail 2>/dev/null
>/opt/bin/fetchmail -d 90 -t 60 -a -e 50 --auth password -f
>/opt/etc/fetchm
>ailrc -L /var/log/fetchmail 2>&1
>touch /myscripts/fetchmailcustom.imap
>
>#
>
>Platform:
>Linksys NSLU2
>
>Installed packages:
>fetchmail - 6.2.5-6
>
>kernel-image-2.4.22-xfs - 2.3r29-r2
>kernel-module-ftdi-sio - 2.3r29-r2
>kernel-module-kaweth - 2.3r29-r2
>kernel-module-pegasus - 2.3r29-r2
>kernel-module-pl2303 - 2.3r29-r2
>kernel-module-usbnet - 2.3r29-r2
>kernel-module-usbserial - 2.3r29-r2
- Next message: Richard Polhill: "Re: Starting fetchmail in daemon mode from cron"
- Previous message: The Master: "test"
- In reply to: Night Owl: "Starting fetchmail in daemon mode from cron"
- Next in thread: Richard Polhill: "Re: Starting fetchmail in daemon mode from cron"
- Reply: Richard Polhill: "Re: Starting fetchmail in daemon mode from cron"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|