blob: f67d37f866bcfc2edc98058ac7d90bf6735b94c3 (
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
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/bin/sh
#
# $NetBSD: innd.sh,v 1.10 2001/05/10 21:58:01 tron Exp $
#
# PROVIDE: inn
# REQUIRE: DAEMON
# KEYWORD: shutdown
if [ -x @@PREFIX@@/inn/bin/rc.news -a -s @@INN_DATA_DIR@@/db/active ]
then
if [ ! -f @@PREFIX@@/etc/nntp/server ]
then
hostname >@@PREFIX@@/etc/nntp/server
fi
if [ ! -f @@PREFIX@@/etc/nntp/domainname ]
then
(set - X `grep ^fromhost: @@INN_DATA_DIR@@/etc/inn.conf`
if [ $# -eq 3 ]
then
echo $3 >@@PREFIX@@/etc/nntp/domainname
fi)
fi
if [ $# -eq 0 ]
then
echo -n ' innd'
su news -c "@@PREFIX@@/inn/bin/rc.news start" >/dev/null
exit 0
fi
case "$1" in
start | stop)
su news -c "@@PREFIX@@/inn/bin/rc.news $1"
exit 0
;;
restart )
$0 stop
sleep 5
exec $0 start
;;
* )
echo "Usage: $0 (start|stop|restart)"
exit 1
;;
esac
fi
exit 0
|