From 1dfcbc6c8e2372345f6181b06acd94f0c184bb5e Mon Sep 17 00:00:00 2001 From: Valery Kartel Date: Wed, 20 Jan 2016 15:44:42 +0200 Subject: main/spamassassin: [V2] APKBUILD recreated with apkbuild-cpan. obsolete init-script replaced with new one, some parts are moved to subpackages - added ssl support for spamd & spamc - perl libraries and configuration data are moved to perl-mail-spamassasin subpackage - spamc client binary have own dependencies and moved to -client subpackage - sa-compile needs development packages to run, so moved to -compiler subpackage - init-script rewritten from scratch and supports legacy conf.d syntax - periodic rules update added to cron TODO: some optional perl-modules still in testing (or still not accepted). When they moved to main, need to add them to cpan-dependency. optional module missing: Geo::IP --- testing/perl-geo-ip optional module missing: Net::CIDR::Lite --- testing/perl-net-cidr-lite && main/perl-net-cidr-lite is present too ... optional module missing: IO::Socket::INET6 --- testing/perl-io-socket-inet6 optional module missing: Encode::Detect::Detector --- not in git optional module missing: Net::Patricia --- testing/perl-net-patricia --- main/spamassassin/spamd.initd | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 main/spamassassin/spamd.initd (limited to 'main/spamassassin/spamd.initd') diff --git a/main/spamassassin/spamd.initd b/main/spamassassin/spamd.initd new file mode 100644 index 00000000000..a016f490749 --- /dev/null +++ b/main/spamassassin/spamd.initd @@ -0,0 +1,34 @@ +#!/sbin/openrc-run + +pidfile=${pidfile:-/run/spamd.pid} +command=/usr/sbin/spamd +command_args="$command_args:--m 5 -c -H}" +extra_started_commands="reload" + +depend() { + need net + before mta + use logger +} + +_legacy() { + [ -n "$PIDFILE ] && pidfile=$PIDFILE + [ -n "$SPAMD_OPTS" ] && command_args=$SPAMD_OPTS +} + +start_pre() { + _legacy + required_dirs="/var/lib/spamassassin/3.004001" + if [ ! -d $required_dirs ]; then + ebegin "Downloading rules" + /usr/bin/sa-update + eend $? + fi + command_args="-d -r $pidfile $command_args" +} + +reload() { + ebegin "Reloading $SVCNAME" + start-stop-daemon --signal=HUP --pidfile $pidfile + eend +} -- cgit v1.2.3