summaryrefslogtreecommitdiff
path: root/mail-filter/amavisd-new/files/amavisd.initd
blob: 4899296cc1404fd1cc1f98c158d90c02308be8b7 (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
#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

extra_started_commands="reload"
extra_commands="debug debug_sa"

prog="/usr/sbin/amavisd"
progname="amavisd-new"

depend() {
	need net
	use logger antivirus snmpd
	before mta
}

start() {
	ebegin "Starting ${progname}"
	"${prog}" start
	eend $?
}

stop() {
	ebegin "Stopping ${progname}"
	"${prog}" stop 1>/dev/null
	eend $?
}

reload() {
	ebegin "Reloading ${progname}"
	"${prog}" reload 1>/dev/null
	eend $?
}

debug() {
	ebegin "Starting ${progname} in debug mode"
	"${prog}" debug
	eend $?
}

debug_sa() {
	ebegin "Starting ${progname} in debug-sa mode"
	"${prog}" debug-sa
	eend $?
}