summaryrefslogtreecommitdiff
path: root/news/inn/files
diff options
context:
space:
mode:
authortron <tron>1999-07-26 20:56:23 +0000
committertron <tron>1999-07-26 20:56:23 +0000
commite90956d5ef42b9e56dabd67673e51ec240c302f6 (patch)
tree6d2274e238be8962dfe55c84c1a99a6d06caee48 /news/inn/files
parent2ff0920cb9702f4f4ddcb402304b3562aa24e0bf (diff)
downloadpkgsrc-e90956d5ef42b9e56dabd67673e51ec240c302f6.tar.gz
Create configuration files in "${PREFIX}/etc/nntp" automatically so that
newsreaders like "nn" or "trn" can use them.
Diffstat (limited to 'news/inn/files')
-rw-r--r--news/inn/files/innd.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/news/inn/files/innd.sh b/news/inn/files/innd.sh
index f832407ecf6..4ee4fed891e 100644
--- a/news/inn/files/innd.sh
+++ b/news/inn/files/innd.sh
@@ -1,10 +1,25 @@
#!/bin/sh
#
-# $NetBSD: innd.sh,v 1.4 1999/07/24 17:38:14 tron Exp $
+# $NetBSD: innd.sh,v 1.5 1999/07/26 20:56:24 tron Exp $
#
if [ -x @@PREFIX@@/bin/rc.news -a -s @@INN_DATA_DIR@@/db/active ];
then
su news -c @@PREFIX@@/bin/rc.news >/dev/null
+
+ if [ ! -f @@PREFIX@@/etc/nntp/server ]
+ then
+ hostname >@@PREFIX@@/etc/nntp/server
+ fi
+
+ if [ ! -f @@PREFIX@@/etc/nntp/domainname ]
+ then
+ set - X `grep -w ^fromhost: @@INN_DATA_DIR@@/etc/inn.conf | head -1`
+ if [ $# -eq 3 ]
+ then
+ echo $3 >@@PREFIX@@/etc/nntp/domainname
+ fi
+ fi
+
echo -n ' innd'
fi
exit 0