Fidonet Portal
07 Dec 2020 09:18, Alan Ianson wrote to Karel Kral:
AI> I had a quick play with systemd on debian. It works well. It's
AI> possible to start a service like binkd or a BBS as a regular user
AI> rather than root.
----- binkd-1.1.ebuild begins -----
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# now edited with nano 2.3.2

#
# 2. http://www.corbina.net/~maloff/binkd/
# ftp://happy.kiev.ua/pub/fidosoft/mailer/binkd/
# The mirrors:
# ftp://fido.thunderdome.us/pub/mirror/binkd/
# ftp://cube.sut.ru/pub/mirror/binkd/
# http://binkd.spb.ru
#
# Documentation:
# English manual for binkd 0.9.2
# http://www.doe.carleton.ca/~nsoveiko/fido/binkd/man/
# (c) Nick Soveiko <nsoveiko@doe.carleton.ca>
# Russian manual for binkd 0.9.9
# http://binkd.grumbler.org/binkd-ug-ru.htm.win.ru
# (c) Stas Degteff 2:5080/102@fidonet
# FAQ
# http://binkd.grumbler.org/binkdfaq.shtml
EAPI=7
inherit eutils
DESCRIPTION="Binkd daemon for ftn over ip"
HOMEPAGE="http://www.corbina.net/~maloff/binkd/"
RESTRICT="mirror"
SRC_URI="ftp://happy.kiev.ua/pub/fidosoft/mailer/binkd/snapshot/binkd-1.1.tar.gz
"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="aso bwlim +bzip2 doc ntlm perl proxy +zlib"
DEPEND="bzip2? ( >=app-arch/bzip2-1.0.6


perl? ( dev-lang/perl )"
RDEPEND="${DEPEND}"
#S=${WORKDIR}/${P}
S=${WORKDIR}/binkd-1.1
src_configure(

# we make the configure work
cp "${S}/mkfls/unix/Makefile.dep" "${S}"
cp "${S}/mkfls/unix/Makefile.in" "${S}"
cp "${S}/mkfls/unix/configure" "${S}"
cp "${S}/mkfls/unix/configure.in" "${S}"
cp "${S}/mkfls/unix/install-sh" "${S}"
cp "${S}/mkfls/unix/mkinstalldirs" "${S}"
# now run configure
local myconf=
use proxy && myconf="--with-proxy"
use ntlm && myconf="${myconf} --with-ntlm"
use aso && myconf="${myconf} --with-aso"
use bwlim && myconf="${myconf} --with-bwlim"
use perl && myconf="${myconf} --with-perl"
# disable zlib if not enabled in use flags
if ! use zlib; then
myconf="${myconf} --without-zlib"
fi
# disable bzip2 if not enabled in use flags
if ! use bzip2; then
myconf="${myconf} --without-bzip2"
fi
econf ${myconf} || die "econf failed"
}
src_compile(

# compile it
emake || die "emake failed"
}
src_install(

# install conf.d
newconfd "${FILESDIR}"/binkd.confd binkd
# install init.d
newinitd "${FILESDIR}"/binkd.initd binkd
# make DESTDIR=${D} install || die
dobin binkd
# install docs
doman binkd.8
}
----- binkd-1.1.ebuild ends -----
----- binkd.confd begins -----
# /etc/conf.d/binkd: config file for /etc/init.d/binkd
# Options to pass to the binkd daemon.
# See the binkd(

# dont use root
# BINKD_USER="xpoint"
# change xpoint to what user dir is home dir
# BINKD_CFG="/home/xpoint/fido/config/binkd.conf"
# pid file must be in homedir
# BINKD_PID="/home/xpoint/fido/binkd.pid"
# options to run as daemon
# dont add mr here !
BINKD_OPTIONS="-CD"
----- binkd.confd ends -----
----- binkd.initd begins -----
#!/sbin/openrc-run
depend(

need net localmount
use dns logger clock wlan
after bootmisc hostname
}
start(

ebegin "Starting binkd"
start-stop-daemon --start --user ${BINKD_USER} --exec /usr/bin/binkd
--pidfile ${BINKD_PID} -- ${BINKD_OPTIONS} ${BINKD_CFG}
eend $?
}
stop(

ebegin "Stopping binkd"
start-stop-daemon --stop --user ${BINKD_USER} --exec /usr/bin/binkd
--pidfile ${BINKD_PID}
eend $?
} ----- binkd.initd ends -----
i learned a lesson some years ago

Regards Benny
... too late to die young

--- Msged/LNX 6.1.2 (Linux/5.9.12-gentoo-x86_64 (x86_64)

* Origin: I will always keep a PC running CPM 3.0 (2:230/0)