TIP: Click on subject to list as thread! ANSI
echo: binkd
to: FLAVIO BESSA
from: MARK LEWIS
date: 2016-08-04 15:23:00
subject: Registering Binkd as a se

04 Aug 16 12:21, you wrote to All:

 FB> I have recently installed Binkd into a Ubuntu linux, but I have
 FB> noticed it did not register itself as a service.

i've never seen such...

 FB> How do I do that?

i use standard init.d scripts but i think someone posted a start script for
that new mess that's trying to take over the *nix world's startup methods...

the following is from an ubuntu server 14.04.4 LTS installation for
synchronet... it runs binkd as the sbbs:sbbs user:group so sbbsecho and binkd
can easily deal with the mail files from each other... there may be a better
way but this seems to work OK... i think this binkd was installed from a
package instead of being built from the repo for that system...

===== start /etc/init.d/binkd =====
#!/bin/sh
### BEGIN INIT INFO
# Provides:          binkd
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
### END INIT INFO

OPTS='/etc/binkd/binkd.cfg -q -C'
PIDDIR='/var/run/binkd'
PIDFILE='$PIDDIR/binkd.pid'
DAEMON='/usr/sbin/binkd'
NAME='binkd'

test -f $DAEMON || exit 0

. /lib/lsb/init-functions

# don't start binkd if it is started by inetd
grep -sq '^binkp[[:space:]]' /etc/inetd.conf && exit 0

#if [ ! -d $PIDDIR ]; then
#  mkdir $PIDDIR
#  chown sbbs:sbbs $PIDDIR
#fi

case "$1" in
  start)
    log_daemon_msg 'Starting FTN mailer' $NAME
    [ -d $PIDDIR/ ] || \
    install -d -o sbbs -g sbbs -m 0755 $PIDDIR/
    start-stop-daemon --start --quiet --background --pidfile $PIDFILE \
        --chuid sbbs:sbbs --exec $DAEMON -- $OPTS
    log_end_msg $?
    ;;
  stop)
    log_daemon_msg 'Stopping FTN mailer' $NAME
    start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
    log_end_msg $?
    ;;
  reload)
    log_daemon_msg 'Reloading FTN mailer' $NAME
    start-stop-daemon --stop --quiet --signal 1 --pidfile $PIDFILE
    log_end_msg $?
    ;;
  restart|force-reload)
    $0 stop
    sleep 1
    $0 start
    ;;
  status)
    status_of_proc -p $PIDFILE $DAEMON $NAME
    ;;
  version)
    $DAEMON -vv
    ;;
  *)
    log_action_msg "Usage: /etc/init.d/binkd
{start|stop|restart|reload|force-reload|version}"
    exit 1
    ;;
esac

exit 0

===== snip =====


)\/(ark

Always Mount a Scratch Monkey

... If it walks out of your refrigerator, LET IT GO!!
---
* Origin: (1:3634/12.73)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.