File: sendnews

package info (click to toggle)
postit 0.5-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 160 kB
  • ctags: 218
  • sloc: ansic: 753; sh: 243; makefile: 61
file content (29 lines) | stat: -rw-r--r-- 834 bytes parent folder | download
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
#!/bin/sh
#
# This script starts 'postit' in a way that feedfiles are properly
# flushed and re-created.

postit_configfile=/etc/news/postit.conf

if [ -f $postit_configfile ]
then
	source $postit_configfile
else
	echo "kein configfile gefunden\n"
	# Enter your paths here if you are not able to change the configfile
	SPOOLPATH=/var/spool/news
	OUTGOING=${SPOOLPATH}/out.going
	BINPATH=/usr/lib/news/bin
	NEWSSERVER=news.foo.org
fi


# Below is an example for a feedfile called ${NEWSSERVER},
# which is to be fed to ${NEWSSERVER}.
# We flush the feed, then rename it, restart the
# feed process, and finally process the renamed feedfile.

${BINPATH}/ctlinnd flush ${NEWSSERVER}
mv ${OUTGOING}/${NEWSSERVER} ${OUTGOING}/${NEWSSERVER}.postit
${BINPATH}/ctlinnd begin ${NEWSSERVER}
${BINPATH}/postit ${NEWSSERVER}.postit ${NEWSSERVER}