summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2017-12-05 13:25:11 -0500
committerMichael Orlitzky <mjo@gentoo.org>2017-12-05 13:46:02 -0500
commitc01a2a0ed33b456d068b436b5d9e185f936455f9 (patch)
treeba874ad20d3c6a5b5b3eb5a04dec610256911b6b /mail-filter/spamassassin/files
parentmetadata/repoman: Move the qahelp and linechecks errors out of the repo (diff)
downloadgentoo-c01a2a0ed33b456d068b436b5d9e185f936455f9.tar.gz
gentoo-c01a2a0ed33b456d068b436b5d9e185f936455f9.tar.bz2
gentoo-c01a2a0ed33b456d068b436b5d9e185f936455f9.zip
mail-filter/spamassassin: fix "postgres" -> "postgresql" in init script.
In commit 5248063, I accidentally changed the name of the PostgreSQL dependency in the OpenRC service script from "postgresql" (correct) to "postgres" (not so much). This commit changes it back to the correct name in a new revision. Thanks to Aaron W. Swenson for noticing the mistake. Closes: https://bugs.gentoo.org/639916 Package-Manager: Portage-2.3.13, Repoman-2.3.3
Diffstat (limited to 'mail-filter/spamassassin/files')
-rw-r--r--mail-filter/spamassassin/files/3.4.1-spamd.init-r338
1 files changed, 38 insertions, 0 deletions
diff --git a/mail-filter/spamassassin/files/3.4.1-spamd.init-r3 b/mail-filter/spamassassin/files/3.4.1-spamd.init-r3
new file mode 100644
index 000000000000..0133d7936259
--- /dev/null
+++ b/mail-filter/spamassassin/files/3.4.1-spamd.init-r3
@@ -0,0 +1,38 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/sbin/spamd"
+pidfile="/run/spamd.pid"
+command_args="--pidfile=${pidfile} ${SPAMD_OPTS}"
+command_args_background="--daemonize"
+
+if ! [ "${SPAMD_RUN_AS_ROOT}" = "true" ]; then
+ # Passing --username=root to spamd kills it, so if SPAMD_RUN_AS_ROOT
+ # is true, then we want to pass no user/group command args at all.
+ # Any value other than "true" gets the default user/group of "spamd".
+ command_args="${command_args} --username=spamd --groupname=spamd"
+fi
+
+: ${SPAMD_NICELEVEL:=0}
+start_stop_daemon_args="--nicelevel ${SPAMD_NICELEVEL}"
+
+# Retry after SPAMD_TIMEOUT seconds because spamd can take a
+# while to kill off all of its children. This was bug 322025.
+: ${SPAMD_TIMEOUT:=15}
+retry="${SPAMD_TIMEOUT}"
+
+extra_started_commands="reload"
+
+depend() {
+ before mta
+ use logger mysql postgresql
+}
+
+reload() {
+ ebegin "Reloading configuration"
+ # Warning: reload causes the PID of the spamd process to
+ # change, but spamd does update its PID file afterwards.
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}