Commit fd72e3a5 authored by Lukas's avatar Lukas

Remove rbldnsd

parent ecfcbb26
# $Id: PKGBUILD 36862 2009-04-28 06:07:16Z eric $
# Contributor: Dale Blount <dale@archlinux.org>
# Maintainer: Dale Blount <dale@archlinux.org>
pkgname=rbldnsd
pkgver=0.996b
pkgrel=1
pkgdesc="Small and fast DNS daemon which is especially made to serve DNSBL zones"
arch=(i686 x86_64)
url="http://www.corpit.ru/mjt/rbldnsd.html"
license=('GPL')
depends=('zlib')
backup=('etc/conf.d/rbldnsd')
options=('force')
install=$pkgname.install
source=(http://www.corpit.ru/mjt/$pkgname/${pkgname}_${pkgver}.tar.gz rc.rbldnsd conf.rbldnsd)
md5sums=('9a0f26f3b33764c325a96bd4c61b26fa' '1d197df99197244290217288b1a91c38'\
'8fc8131d235a938a1e8024ab85dc93ea')
build() {
cd $srcdir/$pkgname-$pkgver
./configure || return 1
make || return 1
install -d $pkgdir/var/lib/rbldns/logs
chown 59:59 $startdir/pkg/var/lib/rbldns || return 1
chown 58:58 $startdir/pkg/var/lib/rbldns/logs || return 1
chmod 0711 -R $startdir/pkg/var/lib/rbldns
install -D -m 0755 rbldnsd $pkgdir/usr/bin/rbldnsd || return 1
install -D -m 0644 rbldnsd.8 $pkgdir/usr/share/man/man8/rbldnsd.8 || return 1
install -D -m 0644 $srcdir/conf.rbldnsd $pkgdir/etc/conf.d/rbldnsd || return 1
install -D -m 0755 $srcdir/rc.rbldnsd $pkgdir/etc/rc.d/rbldnsd || return 1
}
#
# Arguments passed to rbldnsd. See man 8 rbldnsd
#
RBLDNSD_ARGS="-u rbldns:rbldns -r /var/lib/rbldns -b 127.0.0.1/53"
# You need to specify at least one zone to serve, for example:
# be.surbl.org:dnset:be.surbl.org.rbldnsd.
# arg 1: the new package version
post_install() {
if [ -z "`grep '^rbldns::' /etc/group`" ]; then
groupadd -g 58 rbldns >& /dev/null
fi
if [ -z "`grep '^rbldns:' /etc/passwd`" ]; then
useradd -u 58 -d /var/lib/rbldns -g rbldns -s /bin/false rbldns
fi
if [ -z "`grep '^rbldnszones::' /etc/group`" ]; then
groupadd -g 59 rbldnszones >& /dev/null
fi
if [ -z "`grep '^rbldnszones:' /etc/passwd`" ]; then
useradd -u 59 -d /var/lib/rbldns -g rbldnszones -s /bin/false rbldnszones
fi
}
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
post_install $1
}
# arg 1: the old package version
pre_remove() {
userdel rbldns &> /dev/null
groupdel rbldns &> /dev/null
userdel rbldnszones &> /dev/null
groupdel rbldnszones &> /dev/null
}
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
. /etc/conf.d/rbldnsd
PID=$(pidof -o %PPID /usr/bin/rbldnsd)
case $1 in
start)
stat_busy "Starting rbldnsd"
[ -z "$PID" ] && /usr/bin/rbldnsd $RBLDNSD_ARGS &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon rbldnsd
stat_done
fi
;;
stop)
stat_busy "Stopping rbldnsd"
[ ! -z "$PID" ] && /bin/kill $PID &>/dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon rbldnsd
stat_done
fi
;;
restart)
$0 stop
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
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