diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2009-03-31 09:04:45 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2009-03-31 09:04:45 +0000 |
commit | 53daaab1e0f7bcb8de3936bfb2771e6a969135a4 (patch) | |
tree | 8c09308dc4f4b80c64149e3190eee5c716b18506 /extra/clamav | |
parent | 25fbaf5b97a3270f0d758e2ec8ecc2434eb1e631 (diff) | |
download | aports-53daaab1e0f7bcb8de3936bfb2771e6a969135a4.tar.bz2 aports-53daaab1e0f7bcb8de3936bfb2771e6a969135a4.tar.xz |
extra/clamav: split freshclam and clamd to seperate initd scripts and updated them.
Diffstat (limited to 'extra/clamav')
-rw-r--r-- | extra/clamav/APKBUILD | 26 | ||||
-rw-r--r-- | extra/clamav/clamav.confd | 9 | ||||
-rw-r--r-- | extra/clamav/clamav.post-install | 3 | ||||
-rw-r--r-- | extra/clamav/clamd.confd | 5 | ||||
-rw-r--r-- | extra/clamav/clamd.initd (renamed from extra/clamav/clamav.initd) | 9 | ||||
-rw-r--r-- | extra/clamav/freshclam.confd | 5 | ||||
-rw-r--r-- | extra/clamav/freshclam.initd | 34 |
7 files changed, 67 insertions, 24 deletions
diff --git a/extra/clamav/APKBUILD b/extra/clamav/APKBUILD index 8ccf6aa9..e86b6628 100644 --- a/extra/clamav/APKBUILD +++ b/extra/clamav/APKBUILD @@ -2,17 +2,19 @@ # Maintainer: Carlo Landmeter <clandmeter at gmail> pkgname=clamav pkgver=0.94.2 -pkgrel=1 +pkgrel=2 pkgdesc="An anti-virus toolkit for UNIX" url="http://www.clamav.net/" license="GPL" depends="zlib gmp" -install=clamav.pre-install +install="$pkgname.pre-install $pkgname.post-install" makedepends="gmp-dev zlib-dev" subpackages="$pkgname-doc $pkgname-dev" source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz - clamav.initd - clamav.confd + clamd.initd + clamd.confd + freshclam.initd + freshclam.confd clamav-0.94.2-nls.patch $install" @@ -29,12 +31,18 @@ build() { make || return 1 make DESTDIR="$pkgdir" install - install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname - install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname + install -m755 -D "$srcdir"/clamd.initd "$pkgdir"/etc/init.d/clamd + install -m644 -D "$srcdir"/clamd.confd "$pkgdir"/etc/conf.d/clamd + install -m755 -D "$srcdir"/freshclam.initd "$pkgdir"/etc/init.d/freshclam + install -m644 -D "$srcdir"/freshclam.confd "$pkgdir"/etc/conf.d/freshclam + mkdir -p "$pkgdir"/var/run/clamav "$pkgdir"/var/log/clamav } md5sums="1181e6d62341b84708f126cc353f7ebf clamav-0.94.2.tar.gz -d0c708403940c51e52eb27ea1610a27d clamav.initd -431dfe7403323e247a88b97beade5d78 clamav.confd +04f32738c037c96c3fd2c4fa7781fc7a clamd.initd +e84205681f64c07af9ec5b6a3dd8bc38 clamd.confd +fe3cfca9e1355183117936bea6fc6783 freshclam.initd +e84205681f64c07af9ec5b6a3dd8bc38 freshclam.confd 328a0c3449a6b516e443d7db5a0d4d01 clamav-0.94.2-nls.patch -275e05587e2da782781829a1862d57b1 clamav.pre-install" +275e05587e2da782781829a1862d57b1 clamav.pre-install +ec4d600097a15e64dfb714e7739a1804 clamav.post-install" diff --git a/extra/clamav/clamav.confd b/extra/clamav/clamav.confd deleted file mode 100644 index 0abb80c6..00000000 --- a/extra/clamav/clamav.confd +++ /dev/null @@ -1,9 +0,0 @@ -# Sample conf.d file for alpine linux - -# -# Specify daemon $OPTS here. -# - -OPTS="" -USER="nobody" -GROUP="nobody" diff --git a/extra/clamav/clamav.post-install b/extra/clamav/clamav.post-install new file mode 100644 index 00000000..49302061 --- /dev/null +++ b/extra/clamav/clamav.post-install @@ -0,0 +1,3 @@ +#!/bin/sh + +chown -R clamav:clamav /usr/share/clamav /var/run/clamav /var/log/clamav diff --git a/extra/clamav/clamd.confd b/extra/clamav/clamd.confd new file mode 100644 index 00000000..8d08b686 --- /dev/null +++ b/extra/clamav/clamd.confd @@ -0,0 +1,5 @@ +# +# Specify daemon $OPTS here. +# + +OPTS="" diff --git a/extra/clamav/clamav.initd b/extra/clamav/clamd.initd index 980c53e7..8aad87fb 100644 --- a/extra/clamav/clamav.initd +++ b/extra/clamav/clamd.initd @@ -2,7 +2,7 @@ # Sample init.d file for alpine linux. -NAME= +NAME=clamd DAEMON=/usr/sbin/$NAME depend() { @@ -12,8 +12,6 @@ depend() { start() { ebegin "Starting ${NAME}" start-stop-daemon --start --quiet --background \ - --make-pidfile --pidfile /var/run/${NAME}.pid \ - --chuid ${USER}:${GROUP} \ --exec ${DAEMON} -- ${OPTS} eend $? } @@ -21,8 +19,7 @@ start() { stop() { ebegin "Stopping ${NAME}" start-stop-daemon --stop --quiet \ - --exec ${DAEMON} \ - --pidfile /var/run/${NAME}.pid \ + --exec ${DAEMON} --name $NAME \ eend $? } @@ -33,7 +30,7 @@ reload() { return 1 fi start-stop-daemon --stop --oknodo --signal HUP \ - --exec ${DAEMON} --pidfile /var/run/${NAME}.pid + --exec ${DAEMON} --name $NAME eend $? } diff --git a/extra/clamav/freshclam.confd b/extra/clamav/freshclam.confd new file mode 100644 index 00000000..8d08b686 --- /dev/null +++ b/extra/clamav/freshclam.confd @@ -0,0 +1,5 @@ +# +# Specify daemon $OPTS here. +# + +OPTS="" diff --git a/extra/clamav/freshclam.initd b/extra/clamav/freshclam.initd new file mode 100644 index 00000000..e4643bc6 --- /dev/null +++ b/extra/clamav/freshclam.initd @@ -0,0 +1,34 @@ +#!/sbin/runscript + +NAME=freshclam +DAEMON=/usr/bin/$NAME + +depend() { + need net +} + +start() { + ebegin "Starting ${NAME}" + start-stop-daemon --start --quiet --background \ + --exec ${DAEMON} -- -d ${OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${NAME}" + start-stop-daemon --stop --quiet \ + --exec ${DAEMON} --name $NAME \ + eend $? +} + +reload() { + ebegin "Reloading ${NAME}" + if ! service_started "${NAME}" ; then + eend 1 "${NAME} is not started" + return 1 + fi + start-stop-daemon --stop --oknodo --signal HUP \ + --exec ${DAEMON} --name $NAME + eend $? +} + |