🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #84410

Re: best way to call slrnpull?

#84410
From: Phil Boutros
Date: Mon, 17 Sep 2001 04:35
55 lines
2592 bytes
On Mon, 17 Sep 2001 02:29:57 GMT, LinuxBear <vlpbgcys@news.videotron.ca> wrote:
> What is the best way to call slrnpull so that a non-root user has access to
> newsgroups? I put it in a root cron job to run every 15 minutes but I am not
> always online, so I end up having many error messages in my root mail account.

	How about a simple shell script?  Something like:

#v+
#!/bin/bash

if [ -r /var/run/ppp0.pid ]; then
# We assume that ppp0.pid is the file created when you have a PPP 
# connection going...

        echo "Getting news..."
        slrnpull --<options>
        echo "That's all folks..."
        exit 1


else
        echo "Sorry, no PPP connection..."
	exit 1
#v-

	I have a slightly longer version of this script myself.  What
it does is the first part (with getting my email via fetchmail added)
if the connection is established.

	If I'm *not* online, the part after the else (in my longer
script, not in this one) tries to go online.  It checks if it's online
after a minute or so (to give time for the modem to connect via
dialup).  If it is, it gets email and news messages as above.  If it's
not, it waits 10 minutes and tries to go online again.  Repeat as
necessary.

	Let me know if you want that version (the longer one) too.
	
	Just running the above script from cron will just get news
messages if you are online.


> Can slrn be run in some sort of daemon mode that is somehow linked to the ppp
> script?

	Well, the easy way is to just add slrnpull to your
/etc/ppp/ip-up script, or wherever else it may be on your system.
 

Phil
-- 
AH#61  Wolf#14  BS#89  bus#1           philb@total.net
http://www.total.net/~philb        http://eddiekieger.com 
"Power To The People" - BPP     EKIII will ride with me again.
Technical Details
Message-ID: <slrn9qavdk.jj.philb@wolf14.nols.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hammer.uoregon.edu!enews.sgi.com!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!news3
References: <slrn9qao2r.2gv.vlpbgcys@localhost.localdomain>

Show Full Headers
Complete Article Headers
Message-ID: <slrn9qavdk.jj.philb@wolf14.nols.com>
Subject: Re: best way to call slrnpull?
Date: Mon, 17 Sep 2001 04:35:56 +0000
From: Phil Boutros <philb@total.net>
References: <slrn9qao2r.2gv.vlpbgcys@localhost.localdomain>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hammer.uoregon.edu!enews.sgi.com!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!news3
Newsgroups: news.software.readers
Organization: Total lack of...
Lines: 54
NNTP-Posting-Host: p-175.newsdawg.com
User-Agent: slrn/0.9.7.2 (Linux)