Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Mar 2001 19:04:21 +0100
From:      Christoph Sold <so@server.i-clue.de>
To:        Marcos Helbert de Almeida Fontana <mfontana@pinho.ufop.br>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: About RINETD..
Message-ID:  <3ABA3EA5.53DD4E24@i-clue.de>
References:  <3ABA1C61.AD0FE9C7@mail.ufop.br>

next in thread | previous in thread | raw e-mail | index | archive | help
Marcos Helbert de Almeida Fontana schrieb:
> 
> I have installed the rinetd 0.61 and it work perfectly, but it don't
> start
> automaticaly.
> 
> /etc/rc.local:
> echo " rinetd "
> /usr/local/sbin/rinetd
> 
> But when I run it manualy (# /usr/local/sbin/rinetd) all right. Anybody
> know why?

Try

---<file:/usr/local/etc/rc.d/rinetd.sh>---
#!/bin/sh
#
# Start rinetd automagically at startup
#

rinetd=/usr/local/sbin/rinetd
pidfile=/var/run/rinetd.pid

case "$1" in
start)
  if [ -x $rinetd ]; then
    echo -n " rinetd"
    $rinetd
  fi
  ;;
stop)
  if [ -f $pidfile ]; then
    kill `cat $pidfile`
    echo -n ' rinetd'
    rm $pidfile
  else
    echo ' rinetd: not running'
  fi
  ;;
reload)
  if [ -f $pidfile ]; then
    kill -HUP `cat $pidfile`
    echo ' rinetd restarted'
  else
    if [ -x $rinetd ]; then
      echo " rinetd started"
      $rinetd
    else
      echo " rinetd not found"
    fi
  ;;
*)
    echo "Usage: `basename $0` {start|stop|reload}" >&2
    exit 64
    ;;
esac

exit 0
---</file:/usr/local/etc/rc.d/rinetd.sh>---

Anybody feels like send-pr this one as a patch?

HTH
-Christoph Sold

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3ABA3EA5.53DD4E24>