aboutsummaryrefslogtreecommitdiffstats
path: root/main/spamassassin/spamd.initd
diff options
context:
space:
mode:
authorValery Kartel <valery.kartel@gmail.com>2016-01-20 15:44:42 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2016-02-04 09:37:43 +0000
commit1dfcbc6c8e2372345f6181b06acd94f0c184bb5e (patch)
tree3383e5ccc2ae4926621d15b6eb484ef9970d206e /main/spamassassin/spamd.initd
parentdb824002e838087bd1acaf9ba5ef6e29edcc57a0 (diff)
downloadaports-1dfcbc6c8e2372345f6181b06acd94f0c184bb5e.tar.gz
aports-1dfcbc6c8e2372345f6181b06acd94f0c184bb5e.tar.bz2
aports-1dfcbc6c8e2372345f6181b06acd94f0c184bb5e.tar.xz
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
Diffstat (limited to 'main/spamassassin/spamd.initd')
-rw-r--r--main/spamassassin/spamd.initd34
1 files changed, 34 insertions, 0 deletions
diff --git a/main/spamassassin/spamd.initd b/main/spamassassin/spamd.initd
new file mode 100644
index 0000000000..a016f49074
--- /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
+}