/etc/init.d/rbldnsd is in rbldnsd 0.997a-1ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | #! /bin/sh
# rbldnsd startup script.
#
### BEGIN INIT INFO
# Provides: rbldnsd
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
#
# chkconfig: 345 80 30
# description: rbldnsd is a DNS daemon for DNSBLs. Configure it in \
# /etc/default/rbldnsd or /etc/sysconfig/rbldnsd
PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=rbldnsd
DESC=$NAME
DAEMON=/usr/sbin/$NAME
test -f $DAEMON || exit 0
set -e
RBLDNSD=
if [ -f /etc/default/$NAME ] ; then
. /etc/default/$NAME
elif [ -f /etc/sysconfig/$NAME ]; then
. /etc/sysconfig/$NAME
else
exit 0
fi
test -n "$RBLDNSD" || exit 0
forall() {
echo "$RBLDNSD" |
while read name args; do
case "$name" in
""|\#*) continue;;
-) name=$NAME; pidfile=/var/run/$name.pid;;
*) pidfile=/var/run/rbldnsd-$name.pid;;
esac
pid=
if [ -f $pidfile ]; then
read p < $pidfile
if [ -n "$p" -a -f /proc/$p/cmdline ]; then
case "`cat /proc/$p/cmdline 2>/dev/null`" in
*$NAME*) pid=$p;;
esac
fi
fi
$1
done
}
report() {
echo "$1 $DESC: $name"
}
runit() {
$DAEMON -p $pidfile $args
}
start() {
if [ ! "$pid" ]; then
report Starting
runit
fi
}
stop() {
if [ "$pid" ]; then
report Stopping
kill $pid
rm -f $pidfile
fi
}
restart() {
if [ "$pid" ]; then
report Restarting
kill $pid
sleep 1
runit
else
start
fi
}
reload() {
if [ "$pid" ]; then
report Reloading
kill -HUP $pid
fi
}
case "$1" in
start|restart)
forall $1
if [ -d /var/lock/subsys ] ; then touch /var/lock/subsys/$NAME; fi
;;
stop)
forall $1
rm -f /var/lock/subsys/$NAME
;;
reload|force-reload)
forall reload
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac
exit 0
|