Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 263180 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/mail-filter/amavisd-new/files/amavisd.rc6 (-5 / +29 lines)
Lines 1-21 Link Here
1
#!/sbin/runscript
1
#!/sbin/runscript
2
2
3
opts="${opts} reload"
4
5
# If you plan to simultaneously use several Amavisd-new instances, don't forget
6
# to specify alternate home directories, pid and socket files, etc. You can 
7
# create separate configuration files, or add instance-specific directives
8
# to the main configuration file in an "if ($instance_name eq 'alt')" block.
9
# See amavisd-new release notes (2.5.0 release section) for details & examples.
10
# Make a symlink from /etc/init.d/amavisd to /etc/init.d/amavisd.alt,
11
# copy /etc/conf.d/amavisd to /etc/conf.d/amavisd.alt, and optionally specify
12
# a new configuration file using '-c' in AMAVISD_OPTS.
13
14
if [ ${SVCNAME} != "amavisd" ]; then
15
        INSTANCE="${SVCNAME##*.}"
16
        if [ -n "${INSTANCE}" ]; then
17
                AMAVISD_OPTS="${AMAVISD_OPTS} -i ${INSTANCE}"
18
        fi
19
fi
20
3
depend() {
21
depend() {
4
	need net
22
	need net
5
	use logger
23
	use logger
6
	use antivirus
24
	use antivirus
25
	use p0f
7
	before mta
26
	before mta
8
}
27
}
9
28
10
start() {
29
start() {
11
	ebegin "Starting amavisd-new"
30
	ebegin "Starting amavisd-new${INSTANCE:+" (${INSTANCE})"}"
12
	start-stop-daemon --start --quiet --name amavisd --pidfile /var/amavis/amavisd.pid \
31
	/usr/sbin/amavisd ${AMAVISD_OPTS} start >/dev/null 2>&1
13
	 --exec /usr/sbin/amavisd
14
	eend $?
32
	eend $?
15
}
33
}
16
34
17
stop() {
35
stop() {
18
	ebegin "Stopping amavisd-new"
36
	ebegin "Stopping amavisd-new${INSTANCE:+" (${INSTANCE})"}"
19
	start-stop-daemon --stop --quiet --pidfile /var/run/amavis/amavisd.pid
37
	/usr/sbin/amavisd ${AMAVISD_OPTS} stop >/dev/null 2>&1
38
	eend $?
39
}
40
41
reload() {
42
	ebegin "Reloading amavisd-new${INSTANCE:+" (${INSTANCE})"}"
43
	/usr/sbin/amavisd ${AMAVISD_OPTS} reload >/dev/null 2>&1
20
	eend $?
44
	eend $?
21
}
45
}

Return to bug 263180