[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] Fetchnews and Shell Script



#!/bin/sh

cd /var/spool/news/out.going

if [ -f * ]
then
        echo "executing fetchnews -P"
	/usr/local/sbin/fetchnews -P
	exit $?
fi

exit 0




							John

In previous mail, Jeff Grossman spouted...
> 
> Well, after I sent the last message, I got to thinking, maybe you are
> correct.  And then I saw your message, and said, let me try it out.  I just
> logged in and did a fetchnews -Pvvvv, so I could see everything.  There was
> nothing in out.going, I checked first.  It connected and disconnected from
> each server that I have setup.  Now, if I go and setup a cron job to run
> fetchnews -P every 30 minutes, there is going to be network traffic, which I
> do not want.  But, if I create a shell script, to check and see if there are
> articles first, then there will only be network traffic when I actually have
> articles.
> 
> So, back to my original question, does anybody know how I could create this
> shell script?  I want something easy and small.
> 
> Thanks,
> Jeff
> 
> -----
> Jeff Grossman (jeff@xxxxxxxxxxx)
> 
> > -----Original Message-----
> > From: Walt Mankowski [mailto:waltman@xxxxxxxxxx]
> > Sent: Saturday, March 25, 2000 11:48 AM
> > To: leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > Subject: Re: [leafnode-list] Fetchnews and Shell Script
> >
> >
> > Why do you think there will be any network traffic?  fetchnews -P
> > shouldn't generate any network traffic unless there are articles in
> > out.going that it needs to post.
> >
> > On Sat, Mar 25, 2000 at 11:22:47AM -0800, Jeff Grossman wrote:
> > > I do not want network traffic if it is not needed.  I would
> > prefer to check
> > > and see if there are any contents before I create any
> > unnecessary network
> > > traffic.
> > >
> > > Jeff
> > > -----
> > > Jeff Grossman (jeff@xxxxxxxxxxx)
> > >
> > >
> > > ----- Original Message -----
> > > From: "Walt Mankowski" <waltman@xxxxxxxxxx>
> > > To: <leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
> > > Sent: Saturday, March 25, 2000 11:11 AM
> > > Subject: Re: [leafnode-list] Fetchnews and Shell Script
> > >
> > >
> > > > Why bother with all that?  Just set up a cron job to run fetchnews -P
> > > > periodically.  It will just exit if there's nothing in out.going.
> > > >
> > > > Walt
> > > >
> > > > On Sat, Mar 25, 2000 at 10:06:25AM -0800, Jeff Grossman wrote:
> > > > > Hello,
> > > > >
> > > > > I would like to create a shell script, which will look into
> > out.going
> > > every
> > > > > so often and see if there are any contents, and if there are, to run
> > > > > fetchnews -P.  I am not very knowledgable with shell
> > scripts, and not
> > > sure
> > > > > how I would go about seeing if there are any contents in out.going.
> > > Could
> > > > > somebody help me?  I was thinking something like the
> > following, but I
> > > think
> > > > > I am missing something:
> > > > >
> > > > > cd /var/spool/news/out.going
> > > > > if == ? then fetchnews -P
> > > > > fi
> > > > >
> > > > > Thanks,
> > > > > Jeff
> > > > >
> > > > > -----
> > > > > Jeff Grossman (jeff@xxxxxxxxxxx)
> > > > >
> > > > >
> > > > > --
> > > > > leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list
> > for leafnode
> > > > > To unsubscribe, send mail with "unsubscribe" in the subject
> > to the list
> > > >
> > > > --
> > > > leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list
> > for leafnode
> > > > To unsubscribe, send mail with "unsubscribe" in the subject
> > to the list
> > > >
> > >
> > >
> > > --
> > > leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
> > > To unsubscribe, send mail with "unsubscribe" in the subject to the list
> >
> > --
> > leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
> > To unsubscribe, send mail with "unsubscribe" in the subject to the list
> >
> 
> 
> -- 
> leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
> To unsubscribe, send mail with "unsubscribe" in the subject to the list
> 
> 


-- 
"Whenever two people meet, there are really six people present. There is each
man as he sees himself, each man as the other person sees him, and each man
as he really is."  -  William James
  Pinnacle Internet: hosting/dial/dsl/dedicated/consulting - www.pinnatel.net  

-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list