File: do-fetch-news

package info (click to toggle)
leafnode 1.11.11-3
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 2,460 kB
  • sloc: ansic: 10,914; sh: 1,748; xml: 628; makefile: 296; perl: 84; sed: 4
file content (15 lines) | stat: -rw-r--r-- 342 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
#
# Leafnode cron job, invoked every 15 minutes to fetch news if we're on
# a permanent connection.

# Get configuration
. /etc/news/leafnode/debian-config

# Do the cd so that it doesn't matter if we cannot read /root.
cd /

# Get new news.
if [ "$NETWORK" = "permanent" -a -x /usr/sbin/fetchnews ]; then
   /usr/sbin/fetchnews
fi