File: slrnpull.sh

package info (click to toggle)
slrn-ja 0.9.6.2-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 3,828 kB
  • ctags: 5,753
  • sloc: ansic: 57,052; makefile: 309; sh: 302
file content (30 lines) | stat: -rwxr-xr-x 811 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/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)

# Configuration variables.  Change these!!!
dir=/var/spool/news
server=news.mit.edu
slrnpull=/home/john/src/slrn/src/objs/slrnpull

#----------------------------------------------------------------------------
# Make sure that all files will be readable by others
umask 022

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

if /usr/sbin/ppp-on; then
 $slrnpull -d $dir -h $server
 /usr/sbin/ppp-off
else
 exit 1
fi