Discussion:
Binkd: inetd.conf or daemon?
(too old to reply)
Robert Couture
2004-06-18 07:09:20 UTC
Permalink
Hello Jon.

17 Jun 04 14:14, you wrote to all:

JW|> Thanks for any help!

I am running it on start up using this:

/ect/init.d/binkd

=== Cut ===
#! /bin/bash
#
# BinkD Start/Stop the BinkD Daemon.
#

# Source function library.
if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 0
fi

RETVAL=0

# See how we were called.

prog="BinkD"

start() {
echo -n $"Starting $prog: "
daemon --user fido /opt/fido/bin/binkd /opt/fido/etc/binkd.cfg -D -C -q
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/binkd
return $RETVAL
}

stop() {
echo -n $"Stopping $prog: "
killproc binkd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/binkd
return $RETVAL
}

restart() {
stop
start
}

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

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
condrestart)
[ -f /var/lock/subsys/binkd ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|reload|restart|condrestart}"
exit 1
esac

exit $?
=== Cut ===

Now this is on a Fedora Core 2 machine (upgraded from a RH 9.0) so YMMV.

Just put the Start and Kill in the appropriate runtimes and you are set.

Of course, since I have never run Debian, I have no idea if this will also work
for you, but hopefully, it will at least point you in some direction.

Robert
Russell Tiedt
2004-06-18 13:06:02 UTC
Permalink
Hello Jon.

17 Jun 04 14:14, you wrote to all:

JW> I'm firing up another Fidonet BBS and I'm at the tail end of my
JW> configuration. I've run a Fidonet BBS inthe past, but it was on a DOS
JW> box and this is my first attempt at setting up a Linux BBS. I'm
JW> running Debian, my tosser is Crashmail and my editor is Golded+. I
JW> have everything running except for one last thing. I've read all 605
JW> messages in this echo plus every binkd doc I can get my hands on and I
JW> can't wrap my head around this thing.

Well, if you are running Debian, "#apt-get install binkd", it will ask you in
the config/setup stage of the install how you whish to start the program,
make your choice, and it works.

JW> So, I can work around this if I have to. I can set it up to run from
JW> inetd.conf (to cover the receive aspect) and then use error levels to
JW> put it
JW> into binkd -p mode when netmail or echomail is written. (-p works
JW> wonderfully..it polls and then kills itself). But it seems to me that
JW> I shouldn't *have* to do this. There must be a way to start binkd
JW> -D automatically when my machine boots up, no?

Otherwise, fiddle the start-up/init scripts.

Russell
Jon Watson
2004-06-18 09:40:00 UTC
Permalink
All,

Thanks for the many suggestions. I managed to get it up and running as a
daemon by stripping out the binkd line in my inetd.conf. Now, this was
mentioned somewherer before, and I tried i before posting. However, I had
changed enough stuff by screwing around that I ended up with neither type of
start up working.

Anyhow, I have it styling now. Thanks to all!

Jon
Russell Tiedt
2004-06-20 09:55:52 UTC
Permalink
Hello Jon.

18 Jun 04 14:40, you wrote to me:

JW> Thanks for the many suggestions. I managed to get it up and running as
JW> a daemon by stripping out the binkd line in my inetd.conf. Now, this
JW> was mentioned somewherer before, and I tried i before posting.
JW> However, I had changed enough stuff by screwing around that I ended up
JW> with neither type of start up working.

JW> Anyhow, I have it styling now. Thanks to all!

What is important, is that it is working.

Enjoy!

Russell
Stas Degteff
2004-06-22 11:15:08 UTC
Permalink
Hello Jon.

17 Jun 04 14:14, you wrote to all:

JW> It seems to me there are two mutually exclusive choices in how I want
JW> to run binkd: I can run it starting via inetd.conf (-i) or I can run
JW> it as a daemon (-D). Assuming that's correct so far, here's my
JW> problem:

JW> 1. If I run binkd -i then it answers perfectly (or seems to via localhost
JW> testing). However, it doesn't send any waiting netmail. I can see from the
JW> binkd log that it is indeed doing something every 60 seconds (presumably
JW> scanning the outbound queues as per the docs), but whatever it is -
JW> it's not discovering the piece of netmail waiting to go in my
JW> outbound queue.

This is very strange! May be you placed incorrect string into inetd.conf?
Should be:
binkd stream tcp nowait binkd \
/usr/local/bin/binkd binkd -i /usr/local/etc/fido/binkd.cfg


JW> 2. If I run binkd -D then is sends and receives perfectly - this is
JW> what I want. However, I can't figure out how to start it in daemon
JW> mode automatically when my machine boots up. Obviously this is
JW> desireable.

Hmmmmm!
You should use startup script. See `man init` or see handbook for details.
The startup script should contain line like following:
/usr/local/bin/binkd -D /usr/local/etc/fido/binkd.cfg


Stas
Benny Pedersen
2004-07-22 12:00:26 UTC
Permalink
Hello Jon!

17 Jun 04 14:14, Jon Watson wrote to All:

JW> There must be a way to start binkd -D automatically when my machine boots
JW> up, no?

----- rc.local begins -----
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
su xpoint -c '/usr/local/sbin/binkd -C /usr/local/etc/binkd.conf &'
su xpoint -c '/usr/local/sbin/qico -d'
----- rc.local ends -----

replace xpoint with the user you want binkd to run as

----- pollall begins -----
#!/bin/sh
/usr/local/sbin/binkd -p -P 2:236/***@fidonet -P 2:236/***@fidonet -P
2:237/***@fidonet -P 2:2432/***@fidonet -P 2:280/***@fidonet -P
2:5010/***@fidonet /usr/local/etc/binkd.conf &
----- pollall ends -----


Regards Benny

... there can only be one way of life, and it works :)
Jon Watson
2004-07-22 05:32:42 UTC
Permalink
Thanks Benny! I managed to get it running the way I wanted, but you're way is
different. It's good to have more than one option :)


Jon


Benny Pedersen wrote to Jon Watson:
BP> Hello Jon!
BP>
BP> 17 Jun 04 14:14, Jon Watson wrote to All:
BP>
BP> JW> There must be a way to start binkd -D automatically when my machine
BP> boots
BP> JW> up, no?
BP>
BP> ----- rc.local begins -----
BP> #!/bin/sh
BP> #
BP> # This script will be executed *after* all the other init scripts.
BP> # You can put your own initialization stuff in here if you don't
BP> # want to do the full Sys V style init stuff.
BP>
BP> touch /var/lock/subsys/local
BP> su xpoint -c '/usr/local/sbin/binkd -C /usr/local/etc/binkd.conf &'
BP> su xpoint -c '/usr/local/sbin/qico -d'
BP> ----- rc.local ends -----
BP>
BP> replace xpoint with the user you want binkd to run as
BP>
BP> ----- pollall begins -----
BP> #!/bin/sh
BP> /usr/local/sbin/binkd -p -P 2:236/***@fidonet -P 2:236/***@fidonet -P
BP> 2:237/***@fidonet -P 2:2432/***@fidonet -P 2:280/***@fidonet -P
BP> 2:5010/***@fidonet /usr/local/etc/binkd.conf &
BP> ----- pollall ends -----
BP>
BP>
BP> Regards Benny
BP>
BP> ... there can only be one way of life, and it works :)
BP>
BP> --- Msged/LNX 6.1.2 (Linux/2.4.20-30.8.legacy (i686))
BP> * Origin: ftp://junc.org/ binkd 1.0a-377 ***@junc.org (2:237/53)
BP>


- Jon
The HeatSink BBS
Calgary, Alberta, Canada, eh?
Benny Pedersen
2004-07-25 09:54:30 UTC
Permalink
Hello Jon!

22 Jul 04 10:32, Jon Watson wrote to Benny Pedersen:

JW> Thanks Benny! I managed to get it running the way I wanted, but
JW> you're way is different. It's good to have more than one option :)

JW> -+- MBSE BBS v0.61.2 (GNU/Linux-i386)

but mbse have binkd it self ? :-)

(me hides for a few weeks)

Regards Benny

... there can only be one way of life, and it works :)
Jon Watson
2004-07-25 12:17:08 UTC
Permalink
Benny Pedersen wrote to Jon Watson:

BP> but mbse have binkd it self ? :-)
BP>
BP> (me hides for a few weeks)


Yes, but I think at the time I asked this question I was running another BBS
software. Since I changed to MBSE my life has been a lot easier :)



- Jon
The HeatSink BBS
Calgary, Alberta, Canada, eh?

Loading...