diff options
author | Dirkjan Ochtman <djc@gentoo.org> | 2019-11-04 12:22:17 +0100 |
---|---|---|
committer | Dirkjan Ochtman <djc@gentoo.org> | 2019-11-04 12:22:30 +0100 |
commit | b481cbb2f97f7453c04f9a94d98bd8c3e17e3cb8 (patch) | |
tree | b7c6069ebdb9aaddd5e284e3b974a780f04c8b63 /mail-filter/rspamd/files | |
parent | www-client/vivaldi: Stable (diff) | |
download | gentoo-b481cbb2f97f7453c04f9a94d98bd8c3e17e3cb8.tar.gz gentoo-b481cbb2f97f7453c04f9a94d98bd8c3e17e3cb8.tar.bz2 gentoo-b481cbb2f97f7453c04f9a94d98bd8c3e17e3cb8.zip |
mail-filter/rspamd: version bump to 2.1
Closes: https://bugs.gentoo.org/698902
Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Dirkjan Ochtman <djc@gentoo.org>
Diffstat (limited to 'mail-filter/rspamd/files')
-rw-r--r-- | mail-filter/rspamd/files/rspamd-r7.init | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/mail-filter/rspamd/files/rspamd-r7.init b/mail-filter/rspamd/files/rspamd-r7.init new file mode 100644 index 000000000000..311fde9d6372 --- /dev/null +++ b/mail-filter/rspamd/files/rspamd-r7.init @@ -0,0 +1,55 @@ +#!/sbin/openrc-run +# Copyright 2015-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +RSPAMD_CONFIGFILE=${RSPAMD_CONFIGFILE:-"/etc/rspamd/rspamd.conf"} +RSPAMD_GROUP=${RSPAMD_GROUP:-rspamd} +RSPAMD_OPTS=${RSPAMD_OPTS:-""} +RSPAMD_PIDFILE=${RSPAMD_PIDFILE:-"/run/rspamd.pid"} +RSPAMD_USER=${RSPAMD_USER:-rspamd} + +command="/usr/bin/rspamd" +command_rspamadm="/usr/bin/rspamadm" +command_args="${RSPAMD_OPTS} -c \"${RSPAMD_CONFIGFILE}\" -u ${RSPAMD_USER} -g ${RSPAMD_GROUP} --pid \"${RSPAMD_PIDFILE}\"" +start_stop_daemon_args=${RSPAMD_SSDARGS:-"--wait 1000"} +pidfile="${RSPAMD_PIDFILE}" +retry=${RSPAMD_TERMTIMEOUT:-"TERM/60/KILL/5"} + +required_files="${RSPAMD_CONFIGFILE}" + +description="Rapid spam filtering system" + +extra_commands="checkconfig" +extra_started_commands="reload" + +description_checkconfig="Validate rspamd's configuration" +description_reload="Sends rspamd a signal to reload its configuration" + +depend() { + before mta + use dns redis +} + +checkconfig() { + ${command_rspamadm} configtest 1>/dev/null || return 1 +} + +reload() { + checkconfig || return 1 + + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} + +start_pre() { + if [ "${RC_CMD}" != "restart" ]; then + checkconfig || return 1 + fi +} + +stop_pre() { + if [ "${RC_CMD}" = "restart" ]; then + checkconfig || return 1 + fi +} |