All pastes #388091 Raw Edit

Someone

public text v1 · immutable
·published 2007-03-09 20:54 UTC
rendered paste body
init.d script :

###
#! /bin/bash
#
# rwhoisd          Start/Stop the rhwoisd daemon.
#
# 
# processname: rwhoisd
# config: /usr/local/rwhoisd/rwhoisd.conf
# pidfile: /usr/local/rwhoisd/rwhoisd.pid

# Source function library.
. /etc/init.d/functions

RETVAL=0

# See how we were called.
  
prog="rhwoisd"

start() {
        echo -n $"Starting $prog: "
        if [ -x /usr/local/rwhoisd/etc/rwhoisd ]; then
                 daemon /usr/local/rwhoisd/etc/rwhoisd -c
/usr/local/rwhoisd/rwhoisd.conf 
        fi


        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ]
        return $RETVAL
}

stop() {
        echo -n $"Stopping $prog: "
        killproc rwhoisd
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ]
        return $RETVAL
}

rhstatus() {
        status rwhoisd
}

restart() {
        stop
        start
}

reload() {
        echo -n $"Reloading cron daemon configuration: "
        killproc rwhoisd -HUP
        retval=$?
        echo
        return $RETVAL
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  reload)
        reload
        ;;
  status)
        rhstatus
        ;;
 # condrestart)
 #       [ -f /usr/local/rwhoisd/rwhoisd.pid ] && restart || :
 #       ;;
  *)
        echo $"Usage: $0 {start|stop|status|reload|restart}"
        exit 1
esac

exit $?
###



Rwhoisd config file:

# 
# Main RWhois Configuration File 
#
# all configuration options have the form <tag>: <value>.
root-dir: /usr/local/rwhoisd
bin-path: bin
auth-area-file: rwhoisd.auth_area
directive-file: rwhoisd.dir
x-directive-file: rwhoisd.x.dir
max-hits-ceiling: 60
register-spool:register_spool
punt-file: rwhoisd.root
local-host: rwhois1.ispwidget.com 
local-port: 4321
security-allow: rwhoisd.allow
security-deny: rwhoisd.deny
deadman-time: 200
server-type: standalone
chrooted: YES
userid: rwhois
pid-file: rwhoisd.pid
server-contact: you@ispwidget.com
use-syslog: NO
default-log-file: rwhoisd.log
verbosity: 7 # debug
max-children: 30