🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #39686

Automating slrnpull

#39686
From: charliek
Date: Sat, 21 Mar 1998 00:00
81 lines
3323 bytes
Background: I'm running slrn0.9.3.2 & slrnpull on an AMD586 with
32MBram, RH4.2, kernel 2.0.30 & 3hd's.

To avoid hogging our only phone line and to keep peace in the family
:-), I have been using a variation of slrnpull.sh to download groups.
I know my variation should include something other than the'sleep 60'
command to allow ppp-on to connect to my isp. I can't use a cron file
because I dl at random times, and shut down the system when it's not
being used. Both my version of slrnpull.sh and ppp-on are given
below. TIA for any suggestions. Incidently, the connect time to the
isp varies considerably.

#!/bin/sh

# I run this file from cron every night to pull a few newsgroups from my
# news server.  It does the following:
#
#     1.  Runs slrnpull in expire mode to expire old articles
#     2.  Starts up ppp via a ppp-on script (not provided)
#     3.  Runs slrnpull to grab articles from the server
#     4.  Turns off ppp via a ppp-off script (not provided)

#	Modified by cck 2/22/98
#	renamed getnews and put in /usr/sbin

# Configuration variables.  Change these!!!
dir=/var/spool/slrnpull
server=news.nccoast.net
slrnpull=/usr/local/bin/slrnpull

#----------------------------------------------------------------------------

# Before getting new articles, perform expiration.
$slrnpull -d $dir --expire
wait

if /usr/local/bin/ppp-on; then
	sleep 60							# needed for isp connect before
										# slrnpull starts 
#	trap $slrnpull "$@"
 $slrnpull -d $dir -h $server
 /usr/local/bin/ppp-off
else
 exit 1
fi
#--------------------------------

#!/bin/sh
#
# Script to initiate a ppp connection. This is the first part of the
# pair of scripts. This is not a secure pair of scripts as the codes
# are visible with the 'ps' command.  However, it is simple.
#
# These are the parameters. Change as needed.
TELEPHONE=287-7040	# The telephone number for the connection
ACCOUNT=charliek		# The account name for logon (as in 'George Burns')
PASSWORD=mypassword	# The password for this account (and 'Gracie Allen')
LOCAL_IP=0.0.0.0	# Local IP address if known. Dynamic = 0.0.0.0
REMOTE_IP=0.0.0.0	# Remote IP address if desired. Normally 0.0.0.0
NETMASK=255.255.255.0	# The proper netmask if needed
#
# Export them so that they will be available at 'ppp-on-dialer' time.
export TELEPHONE ACCOUNT PASSWORD
# 
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
#
# Initiate the connection
# 
exec /usr/sbin/pppd debug lock modem crtscts /dev/ttyS0 38400 \
	asyncmap 20A0000 escape FF mru 296 kdebug 0 $LOCAL_IP:$REMOTE_IP \
	noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT

-- 
---------
|       |
|   C   |  "Csquared K" alias cck 
|       |   charliek@nccoast.net	
---------

Technical Details
Message-ID: <slrn6h6948.vc.charliek@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!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <slrn6h6948.vc.charliek@localhost.localdomain>
Subject: Automating slrnpull
Date: Sat, 21 Mar 1998 00:00:00 +0000
From: charliek@localhost.localdomain (charliek)
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!not-for-mail
X-Deja-AN: 336144925
Organization: Vnet Internet Access, Inc.
Reply-To: charliek@nccoast.net
Newsgroups: news.software.readers