From e90956d5ef42b9e56dabd67673e51ec240c302f6 Mon Sep 17 00:00:00 2001 From: tron Date: Mon, 26 Jul 1999 20:56:23 +0000 Subject: Create configuration files in "${PREFIX}/etc/nntp" automatically so that newsreaders like "nn" or "trn" can use them. --- news/inn/files/innd.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'news/inn/files') 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 -- cgit v1.2.3