diff options
author | Valery Kartel <valery.kartel@gmail.com> | 2016-01-20 20:43:52 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-01-21 06:43:21 +0000 |
commit | dc22d5617cdda529193e753640e9647a6663f4c2 (patch) | |
tree | c81f62fd52270d95af0c1d1430dd6f528efc7272 /testing/rspamd/rspamd.initd | |
parent | 7cce64aecb1610cbcae427843e6fdb2f96b210f0 (diff) | |
download | aports-dc22d5617cdda529193e753640e9647a6663f4c2.tar.bz2 aports-dc22d5617cdda529193e753640e9647a6663f4c2.tar.xz |
testing/rspamd: new aport
Rapid spam filtering system
https://rspamd.com
Diffstat (limited to 'testing/rspamd/rspamd.initd')
-rw-r--r-- | testing/rspamd/rspamd.initd | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/rspamd/rspamd.initd b/testing/rspamd/rspamd.initd new file mode 100644 index 0000000000..5189e49348 --- /dev/null +++ b/testing/rspamd/rspamd.initd @@ -0,0 +1,29 @@ +#!/sbin/openrc-run + +description="Rapid spam filtering system" +command="/usr/sbin/rspamd" +command_args="-u rspamd -g rspamd" +cfgfile=${cfgfile:-/etc/rspamd/rspamd.conf} +pidfile="/run/rspamd/rspamd.pid" +required_files="$cfgfile" +extra_started_commands="reload" +description_reload="Reload configuration" + +depend() { + need localmount net + before exim postfix +} + +start_pre() { + ebegin + [ "$cfgfile" = "/etc/rspamd/rspamd.conf" ] || command_args="$command_args -c $cfgfile" + checkpath --directory --mode 750 --owner rspamd:rspamd "${pidfile%/*}" + $command $command_args -t &>/dev/null + eend $? +} + +reload() { + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --signal HUP --pidfile ${pidfile} + eend $? +} |