Swap out xinetd for rlinetd

This commit is contained in:
Deon George 2023-06-27 14:29:53 +10:00
parent bee52a96b9
commit f834eff73b
8 changed files with 48 additions and 29 deletions

View File

@ -7,7 +7,7 @@ FROM debian:bullseye-slim
RUN ln -sf /usr/share/zoneinfo/Australia/Melbourne /etc/localtime
RUN apt-get update \
&& apt-get install -yyq curl ifcico crashmail jamnntpd xinetd nginx supervisor cron procps less logrotate netcat iputils-ping \
&& apt-get install -yyq curl ifcico crashmail jamnntpd rlinetd nginx supervisor cron procps less logrotate netcat iputils-ping ssmtp \
zip unzip arc arj unrar-free lhasa p7zip vim libtimedate-perl \
&& mkdir /etc/jamnntpd && mv /etc/jamnntpd.* /etc/jamnntpd/ && mv /etc/jamnntpd /etc/jamnntpd.orig \
&& apt-get -y purge exim4-base \
@ -19,16 +19,16 @@ RUN apt-get update \
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" > /etc/apt/sources.list.d/backports.list
RUN apt-get update \
&& apt-get install -yyq nncp less ssmtp \
&& apt-get install -yyq nncp \
&& mkdir /etc/nncp \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/log/nncp
# Add in Leenooks' apt repository
RUN curl -sL http://apt.leenooks.net/setup.sh | DISTRO=bullseye bash
RUN curl -sL http://apt.dege.au/setup.sh | DISTRO=bullseye bash
# For qico
RUN curl -sL http://apt.leenooks.net/setup.sh | DISTRO=buster bash
RUN curl -sL http://apt.dege.au/setup.sh | DISTRO=buster bash
RUN echo "deb http://deb.debian.org/debian buster main" > /etc/apt/sources.list.d/buster-oldstable.list
# Add ZeroTier
@ -99,7 +99,7 @@ RUN apt-get update \
COPY nginx/binkps.conf /etc/nginx/modules-enabled/
COPY nginx/binkps.crt nginx/binkps.key /etc/nginx/conf.d/ssl/
COPY xinetd.d /etc/xinetd.d/
COPY rlinetd.d /etc/rlinetd.d/
#COPY --chmod=644 logrotate.d /etc/logrotate.d/
COPY logrotate.d /etc/logrotate.d/
RUN chmod 644 /etc/logrotate.d/*

9
rlinetd.d/fido Normal file
View File

@ -0,0 +1,9 @@
service "fido"
{
protocol tcp;
user "root";
instances 10;
exec "/usr/sbin/qico -aauto";
interface any;
family ipv6;
}

9
rlinetd.d/tfido Normal file
View File

@ -0,0 +1,9 @@
service "tfido"
{
protocol tcp;
user "root";
instances 10;
exec "/usr/lib/ifmail/ifcico -r0 -t1";
interface any;
family ipv6;
}

23
start_daemon Executable file
View File

@ -0,0 +1,23 @@
#!/bin/sh
PIDDIR=/var/run
SLEEP=5
DAEMON=${1}
shift
PROG=$(basename $DAEMON)
echo "* Starting daemon [${PROG}]"
${DAEMON}
pidof ${PROG} > ${PIDDIR}/$PROG
DAEMON_RUN=true
while ${DAEMON_RUN}; do
for pid in $(cat ${PIDDIR}/$PROG); do
#echo "- Checking PID [${pid}]"
( ps -p ${pid} > /dev/null && sleep ${SLEEP} ) || DAEMON_RUN=false
done
done
echo "* Daemon [${PROG}] no longer running"

View File

@ -0,0 +1,2 @@
[program:rlinetd]
command=/usr/sbin/rlinetd -d

View File

@ -1,2 +0,0 @@
[program:xinetd]
command=/usr/sbin/xinetd -pidfile /run/xinetd.pid -inetd_ipv6 -dontfork -stayalive

View File

@ -1,11 +0,0 @@
service fido
{
socket_type = stream
protocol = tcp
flags = IPv6
wait = no
user = root
instances = 10
server = /usr/sbin/qico
server_args = -aauto
}

View File

@ -1,11 +0,0 @@
service tfido
{
socket_type = stream
protocol = tcp
flags = IPv6
wait = no
user = root
instances = 10
server = /usr/lib/ifmail/ifcico
server_args = -r0 -t1
}