summaryrefslogtreecommitdiff
path: root/news/inn/files/innd.in
blob: a86073304c933d99d7ea7ea74c7adff945b3ae06 (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
#!/bin/sh

# $FreeBSD$
#
# PROVIDE: innd
# REQUIRE: DAEMON
# KEYWORD: shutdown

. /etc/rc.subr

name=innd
rcvar=innd_enable

load_rc_config ${name}

innd_enable=${innd_enable-"NO"}
innd_user=${innd_user-"news"}
innd_group=${innd_group-"news"}

required_files="%%DBDIR%%/history.dir"

start_cmd=${name}_start
stop_cmd=${name}_stop

command=%%NEWSBASE%%/bin/rc.news

innd_start() {
	su -fm ${innd_user} -c "${command} start"
}

innd_stop() {
	su -fm ${innd_user} -c "${command} stop"
}

run_rc_command "$1"