summaryrefslogtreecommitdiff
path: root/news/inn/pkg/INSTALL
blob: 80f866286e67ac5fc341ee78421b2c30228a4c40 (plain)
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
30
31
32
33
34
35
36
37
#!/bin/sh
#
# $NetBSD: INSTALL,v 1.2 2000/07/03 13:45:54 veego Exp $

if [ "$2" != "POST-INSTALL" ]; then
  exit 0
fi

if [ ! -d @@INN_DATA_DIR@@ ]; then
	mkdir -p @@INN_DATA_DIR@@
	chown news:news @@INN_DATA_DIR@@
	chmod 775 @@INN_DATA_DIR@@
fi

DIRS="db etc log log/OLD run spool"
for DIR in $DIRS; do
	if [ ! -d @@INN_DATA_DIR@@/$DIR ]; then
		install -d -o news -g news -m 775 @@INN_DATA_DIR@@/$DIR
	fi
done

SPOOLS="articles overview archive incoming incoming/bad outgoing uniover innfeed"
for DIR in $SPOOLS; do
	if [ ! -d @@INN_DATA_DIR@@/spool/$DIR ]; then
		install -d -o news -g news -m 775 @@INN_DATA_DIR@@/spool/$DIR
	fi
done

ETC="actsync.cfg actsync.ign control.ctl cycbuff.conf distrib.pats expire.ctl incoming.conf inn.conf innfeed.conf innreport.conf innwatch.ctl moderators motd.news news2mail.cf newsfeeds nnrp.access nnrpd.track nntpsend.ctl overview.ctl overview.fmt passwd.nntp storage.conf"

for FILE in $ETC; do 
	if [ ! -f @@INN_DATA_DIR@@/etc/$FILE ]; then
		install -c -o news -g news -m 664 @@PREFIX@@/share/examples/inn/$FILE @@INN_DATA_DIR@@/etc
	fi
done

exit 0