File: slrnpull.ppp.ip-up

package info (click to toggle)
slrn 1.0.3%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: buster
  • size: 6,412 kB
  • sloc: ansic: 39,852; sh: 3,777; perl: 467; makefile: 229; sed: 24
file content (19 lines) | stat: -rw-r--r-- 442 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
#
# This script is called when ppp/ifup connects to the network.
# It pulls in news with slrnpull.
#
# Written By Joey Hess <joeyh@debian.org>

[ -x /usr/bin/slrnpull ] || exit 0

if [ -f /etc/default/slrnpull ]; then
	. /etc/default/slrnpull
fi

cd /var/spool/slrnpull

if [ "$RUNFROM" = "ip-up" -a "$METHOD" != loopback ] ; then
	# Get new articles.
	su news -s /bin/sh -c 'slrnpull -h `head -n 1 /etc/news/server` >/dev/null'
fi