diff --git a/README.md b/README.md index d6a63d7..3e777e6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # BBBS Daemons -Serveis per al dimoni `systemd` que activen i ofereixen la connectivitat necessària al programari `BBBS`amb el que funciona **EOTB**. +Serveis per al dimoni `systemd` que activen i ofereixen la connectivitat necessària al programari `BBBS`amb el que funciona **EOTB**, tant entrants com a sortints. + +* `bbbsd2.service` és el servei encarregat de donar la connectivitat entre *Nodes* de *FidoNet*, establint les comunicacions sortints (*outbound*) cap aquells *links* als que *EOTB* contacta (*uplinks*), i captant les comunicacions entrants (*inbound*) d'aquells *links* que contacten amb *EOTB* (*downlinks* i *punts*). + +* `bbbsd3.service` és el servei encarregat de donar la connectivitat entre *Usuaris* de *EOTB*, establint les comunicacions entrants del dimoni `BBBS` pels protocols `telnet`, `ftp`, `http`, `binkp` i les seves variants xifrades amb `SSL`. + +Per si algú no està funcionant amb `systemd`, incloc, dins la carpeta `initd` els anteriors serveis que feia servir per al dimoni `init`: `bbbsd2` crida a `bbbsd2.sh`, i `bbbsd3` crida a `bbbsd3.sh`, també per establir la connectivitat sortint i entrant, respectivament. `` \ No newline at end of file diff --git a/bbbsd2.service b/bbbsd2.service new file mode 100644 index 0000000..d12f02c --- /dev/null +++ b/bbbsd2.service @@ -0,0 +1,13 @@ +# Contents of /etc/systemd/system/bbbsd2.service +[Unit] +Description=BBBSD Fidonet Exchange Daemon +After=network.target + +[Service] +Type=simple +Restart=always +Environment=BBBSDIR=/opt/bbbs +ExecStart=/opt/bbbs/bbbs 2 2 TCPIP + +[Install] +WantedBy=multi-user.target diff --git a/bbbsd3.service b/bbbsd3.service new file mode 100644 index 0000000..7e64e4a --- /dev/null +++ b/bbbsd3.service @@ -0,0 +1,13 @@ +# Contents of /etc/systemd/system/bbbsd2.service +[Unit] +Description=BBBSD Users Exchange Daemon +After=network.target + +[Service] +Type=simple +Restart=always +Environment=BBBSDIR=/opt/bbbs +ExecStart=/opt/bbbs/bbbsd 3 995 telnetd:23 telnetd:992:ssl httpd:80 httpd:443:ssl ftpd:21 ftpd:990:ssl rawd:24554:binkp rawd:24555:binkp:ssl quiet + +[Install] +WantedBy=multi-user.target diff --git a/initd/bbbsd2 b/initd/bbbsd2 new file mode 100755 index 0000000..8319638 --- /dev/null +++ b/initd/bbbsd2 @@ -0,0 +1,31 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bbbsd2 +# Should-Start: console-screen dbus network-manager +# Required-Start: $all +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start Outgoing connections BBBS Daemon +### END INIT INFO +# + +set -e + +. /lib/lsb/init-functions + +PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin:/opt/bbbs + +SCRIPT="/opt/bash/bbbsd2.sh" +PROGRAMNAME="bbbs" +case "$1" in +start) + su - root -c" + nohup /opt/bash/bbbsd2.sh &" + ;; +stop) + skill $PROGRAMNAME + ;; +esac + +exit 0 diff --git a/initd/bbbsd2.sh b/initd/bbbsd2.sh new file mode 100755 index 0000000..15fae9e --- /dev/null +++ b/initd/bbbsd2.sh @@ -0,0 +1,4 @@ +#!/bin/bash +#kishpa +/opt/bbbs/bbbs 2 2 TCPIP +#eof diff --git a/initd/bbbsd3 b/initd/bbbsd3 new file mode 100755 index 0000000..f557494 --- /dev/null +++ b/initd/bbbsd3 @@ -0,0 +1,31 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: bbbsd3 +# Should-Start: console-screen dbus network-manager +# Required-Start: $all +# Required-Stop: $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start Ingoing connections BBBS Daemon +### END INIT INFO +# + +set -e + +. /lib/lsb/init-functions + +PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin:/opt/bbbs + +SCRIPT="/opt/bash/bbbsd3.sh" +PROGRAMNAME="bbbsd" +case "$1" in +start) + su - root -c" + /opt/bash/bbbsd3.sh" + ;; +stop) + skill $PROGRAMNAME + ;; +esac + +exit 0 diff --git a/initd/bbbsd3.sh b/initd/bbbsd3.sh new file mode 100755 index 0000000..a970613 --- /dev/null +++ b/initd/bbbsd3.sh @@ -0,0 +1,15 @@ +#!/bin/bash +#kishpa +BBBSDIR=/opt/bbbs +TZUTC=+0200 +PATH=/sbin:/usr/sbin:/bin:/usr/bin:$BBBSDIR +# +NOW=$(date +"%d-%m-%Y-%H-%M") +FILE="backup.logs.$NOW.tar.gz" +LOGS=/opt/bbbs/main +tar czvf /opt/logs/$FILE $LOGS/log* +rm -f $LOGS/log* +# +$BBBSDIR/bbbs bsetpack +/opt/bbbs/bbbsd 3 995 telnetd:23 telnetd:992:ssl httpd:80 httpd:443:ssl ftpd:21 ftpd:990:ssl rawd:24554:binkp rawd:24555:binkp:ssl quiet fork +#eof