FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 02-11-2010, 06:36 PM
matias kaukonen
 
Default fetchmail and watch command

What I'm trying to do is enable the watch command to run a prog named fetchmail.run.
The following command string does not work when run in the background (it
works ok from the foreground):

watch -n 30 fetchmail.run > /dev/null &

*
fetchmail.run
if ["`ps --User matias | grep fetchmail`" == ""]; then
/usr/bin/fetchmail -f ~/.fetchmailrc --mda "procmail -f %F" > /dev/null 2>&1; fi

Is there some technique to fix this that's concise and easy to understand?


thx.,
matias.
~

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
 
Old 02-11-2010, 06:55 PM
Chris Tyler
 
Default fetchmail and watch command

On Thu, 2010-02-11 at 14:36 -0500, matias kaukonen wrote:
> What I'm trying to do is enable the watch command to run a prog named
> fetchmail.run.
> The following command string does not work when run in the background
> (it
> works ok from the foreground):
>
> watch -n 30 fetchmail.run > /dev/null &
>
> fetchmail.run
> if ["`ps --User matias | grep fetchmail`" == ""]; then
> /usr/bin/fetchmail -f ~/.fetchmailrc --mda "procmail -f %F"
> > /dev/null 2>&1; fi
>
> Is there some technique to fix this that's concise and easy to
> understand?
>
> thx.,
> matias.
> ~

watch is probably stopping on signal 19 because of tty access.

Seems to me that you just want to run this command every 30 seconds. Why
not just put a loop in the fetchmail.run script?

while sleep 30
do
...
done


-Chris

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
 
Old 02-11-2010, 07:39 PM
Armelius Cameron
 
Default fetchmail and watch command

On Thursday 11 February 2010 14:36:50 matias kaukonen wrote:
> What I'm trying to do is enable the watch command to run a prog named
> fetchmail.run.
<snip>
> Is there some technique to fix this that's concise and easy to understand?

Why do you want to do this ? Fetchmail can be run as daemon that will poll
every x second, e.g:
fetchmail -d 30

--
AC
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
 

Thread Tools




All times are GMT. The time now is 07:55 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org