summaryrefslogtreecommitdiff
blob: 7482a3f1d20b91a02cde506c5513fedc079b78d1 (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
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

command="/usr/sbin/amavisd-snmp-subagent-zmq"
pidfile="/run/${RC_SVCNAME}.pid"

# The RELEASE_NOTES say "it is safe to run it as root, although
# perhaps not necessary." I'm not in a position to test, but I bet
# it's safe to run this as amavis:amavis. Since the program itself
# doesn't have the ability to drop privileges, we'd have to let OpenRC
# do that; and in that case, the easiest way to deal with the PID file
# is to let OpenRC handle that, too.
#
# Thus as a means of future-proofing, we run $command in the
# foreground, and let OpenRC background it and write a PID file. So
# if somebody wants to try command_user="amavis:amavis" here, it might
# just work.
command_args="-f"
command_background="true"

depend() {
  use logger
  before amavisd-new snmpd
  need amavis-mc
}