Commit 53daaab1 authored by Carlo Landmeter's avatar Carlo Landmeter

extra/clamav: split freshclam and clamd to seperate initd scripts and updated them.

parent 25fbaf5b
......@@ -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"
#!/bin/sh
chown -R clamav:clamav /usr/share/clamav /var/run/clamav /var/log/clamav
# Sample conf.d file for alpine linux
#
# Specify daemon $OPTS here.
#
OPTS=""
USER="nobody"
GROUP="nobody"
......@@ -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 $?
}
#
# Specify daemon $OPTS here.
#
OPTS=""
#!/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 $?
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment