diff options
author | Elias Werberich <elias@werberich.de> | 2017-07-31 09:50:39 +0200 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2017-09-01 09:19:56 +0000 |
commit | 2ee0c2d51ba823872d385d98f03ac9395ce3b1e1 (patch) | |
tree | b73c30ef5fb8b880b845aba9612436eaceb2633b /main/amavisd-new | |
parent | c7be5ce15555e9d8429bfc2546ed72a51b04f80b (diff) | |
download | aports-2ee0c2d51ba823872d385d98f03ac9395ce3b1e1.tar.bz2 aports-2ee0c2d51ba823872d385d98f03ac9395ce3b1e1.tar.xz |
main/amavisd-new: modernize openrc scripts
Diffstat (limited to 'main/amavisd-new')
-rw-r--r-- | main/amavisd-new/APKBUILD | 19 | ||||
-rw-r--r-- | main/amavisd-new/amavisd.confd | 4 | ||||
-rw-r--r-- | main/amavisd-new/amavisd.init | 23 | ||||
-rw-r--r-- | main/amavisd-new/amavisd.initd | 17 |
4 files changed, 34 insertions, 29 deletions
diff --git a/main/amavisd-new/APKBUILD b/main/amavisd-new/APKBUILD index da0829f9f5..30e151089a 100644 --- a/main/amavisd-new/APKBUILD +++ b/main/amavisd-new/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Leonardo Arena <rnalrd@alpinelinux.org> pkgname=amavisd-new pkgver=2.11.0 -pkgrel=1 +pkgrel=2 pkgdesc="High-performance interface between mailer (MTA) and content checkers" url="http://www.ijs.si/software/amavisd" arch="noarch" @@ -15,8 +15,13 @@ depends="sed file perl perl-archive-zip perl-carp perl-convert-tnef " makedepends="" install="$pkgname.pre-install" +options="!check" subpackages="" -source="http://www.ijs.si/software/amavisd/$pkgname-$pkgver.tar.xz" +source=" + http://www.ijs.si/software/amavisd/$pkgname-$pkgver.tar.xz + amavisd.initd + amavisd.confd + " pkgusers="amavis" pkggroups="amavis" @@ -50,14 +55,16 @@ package() { -e "s:^.*\$daemon_user = 'vscan';\(.*\)$:\$daemon_user = 'amavis';\1:" \ -e "s:^.*\$daemon_group = 'vscan';\(.*\)$:\$daemon_group = 'amavis';\1:" < amavisd.conf > amavisd.conf.alpine install -m 640 -o root -D amavisd.conf.alpine ${pkgdir}${CONFIG} - install -m 755 -D ../../amavisd.init $pkgdir/etc/init.d/amavisd ) + install -Dm755 "$srcdir"/amavisd.initd "$pkgdir"/etc/init.d/amavisd + install -Dm644 "$srcdir"/amavisd.confd "$pkgdir"/etc/conf.d/amavisd + chown -R amavis:amavis "$pkgdir"/var/amavis chmod -R 750 "$pkgdir"/var/amavis chown root:amavis "$pkgdir"/etc/amavisd.conf } -md5sums="4642d63c5d3f0daafbcacb9bb553e6f3 amavisd-new-2.11.0.tar.xz" -sha256sums="b41de4f0796cb344120c9792c82fc25177cbf9f51aaa5f91536cdf34aea89906 amavisd-new-2.11.0.tar.xz" -sha512sums="a33292c976abf54db9475392069658c926e7a6f11a4970bbe353b34b3343388bc83b40eda4729f8efa735a3a6e23fd1ed83487f6f7ccf1e9f0903220e6d26957 amavisd-new-2.11.0.tar.xz" +sha512sums="a33292c976abf54db9475392069658c926e7a6f11a4970bbe353b34b3343388bc83b40eda4729f8efa735a3a6e23fd1ed83487f6f7ccf1e9f0903220e6d26957 amavisd-new-2.11.0.tar.xz +6a9dd16a6b52f3d1fbd16887f29ccceddc58e88a02e681f23c1fe54b7e24feea5089d52813f4f3e87d9242daf79d2b2ea1e7c451d83d7de943403e71dc61c4e5 amavisd.initd +a5ce3583c34197f335372728cf92da23bae2cd7a9ae48daff6eaadbf66fbd5be6bb8b480b0fce1ea2b3a662b0a54d1d2f1f277d2f9a06d9630b57fa5d7ac2635 amavisd.confd" diff --git a/main/amavisd-new/amavisd.confd b/main/amavisd-new/amavisd.confd new file mode 100644 index 0000000000..d576300335 --- /dev/null +++ b/main/amavisd-new/amavisd.confd @@ -0,0 +1,4 @@ +# amavisd conf.d + +user="amavis" +group="amavis" diff --git a/main/amavisd-new/amavisd.init b/main/amavisd-new/amavisd.init deleted file mode 100644 index 23f92af3f3..0000000000 --- a/main/amavisd-new/amavisd.init +++ /dev/null @@ -1,23 +0,0 @@ -#!/sbin/runscript - -PIDFILE="/var/amavis/amavisd.pid" - -depend() { - need net - use logger - use antivirus - before mta -} - -start() { - ebegin "Starting amavisd-new" - start-stop-daemon --start --quiet --name amavisd --pidfile ${PIDFILE} \ - --exec /usr/sbin/amavisd - eend $? -} - -stop() { - ebegin "Stopping amavisd-new" - start-stop-daemon --stop --quiet --pidfile ${PIDFILE} - eend $? -} diff --git a/main/amavisd-new/amavisd.initd b/main/amavisd-new/amavisd.initd new file mode 100644 index 0000000000..41f731d996 --- /dev/null +++ b/main/amavisd-new/amavisd.initd @@ -0,0 +1,17 @@ +#!/sbin/openrc-run + +pidfile="/run/$RC_SVCNAME.pid" + +name="amavisd" +command="/usr/sbin/$name" +command_args="-c /etc/amavisd.conf foreground" +command_background="yes" + +start_stop_daemon_args="--user $user:$group" + +depend() { + need net + use logger + use antivirus + before mta +} |