Initial bulk upload
This commit is contained in:
parent
7e6e1b6f5c
commit
870c50ec74
6
LICENSE
6
LICENSE
|
@ -208,8 +208,8 @@ If you develop a new program, and you want it to be of the greatest possible use
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
|
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
systemd-bbbs
|
systemd
|
||||||
Copyright (C) 2025 eotb
|
Copyright (C) 2024 eotb
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
@ -221,7 +221,7 @@ Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
|
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
systemd-bbbs Copyright (C) 2025 eotb
|
systemd Copyright (C) 2024 eotb
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
|
66
README.md
66
README.md
|
@ -1,2 +1,66 @@
|
||||||
# systemd-bbbs
|
# BBBS Daemons
|
||||||
|
|
||||||
|
## Situació
|
||||||
|
|
||||||
|
El programari `BBBS`, es composa de dos mòduls principals, un que fa les funcions de concentrador de connexions i un altre que és el programari de `BBS` com a tal.
|
||||||
|
|
||||||
|
Tots dos s'inicien de manera manual.
|
||||||
|
|
||||||
|
|
||||||
|
## Problema
|
||||||
|
|
||||||
|
Davant de situacions que requereixen reiniciar totalment l'equip on s'executa `BBBS`, o putinejar els `runlevel`, aquestes execucions es finalitzen, requerint iniciar-les de nou de manera manual.
|
||||||
|
|
||||||
|
En situacions on hi ha establert algun mecanisme de tipus `wake-on-lan` o similar, i que es produeix en circumstàncies que no precisen de presència i/o intervenció humana, arrencar manualment els serveis `BBBS` pot ser un inconvenient.
|
||||||
|
|
||||||
|
|
||||||
|
## Solució
|
||||||
|
|
||||||
|
Recolzar-se en el dimoni de sistema `systemd`[^1] per definir dos serveis que activen i ofereixen la connectivitat necessària al programari `BBBS`, tant entrant com sortint, i que s'inicien i aturen, de la mà del sistema.
|
||||||
|
|
||||||
|
* `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`.
|
||||||
|
|
||||||
|
### Llicència de `BBBS`:
|
||||||
|
|
||||||
|
S'ha de tenir en compte que els serveis d'aquest repositori estan ajustats al llicènciament que tinc establert amb en `Kim Heino`, el creador del programari, de manera que heu d'ajustar[^2] el número de nodes d'inici i de final de servei, d'acord a la vostra situació.
|
||||||
|
|
||||||
|
|
||||||
|
## Execució
|
||||||
|
|
||||||
|
De cara a fer servir els dos serveis, seguirem les passes habituals.
|
||||||
|
|
||||||
|
Per exemple, per a `bbbsd3.service`, copiar el servei allà on `systemd` el buscarà:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp bbbsd3.service /etc/systemd/system/.
|
||||||
|
```
|
||||||
|
Recarregar `systemd` per tal que el dimoni reconegui l'existència del nou servei:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
systemctl daemon-reload
|
||||||
|
```
|
||||||
|
Fer que `systemd` activi el nou servei:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
systemctl enable bbbsd3.service
|
||||||
|
|
||||||
|
Created symlink /etc/systemd/system/multi-user.target.wants/bbbsd3.service → /etc/systemd/system/bbbsd3.service.
|
||||||
|
```
|
||||||
|
|
||||||
|
I verificar que `systemd` és capaç d'iniciar i aturar el servei sense problemes:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
systemctl start bbbsd3.service
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
systemctl stop bbbsd3.service
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
`<EOF>`
|
||||||
|
|
||||||
|
[^1]: 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.
|
||||||
|
[^2]: A la línia `ExecStart=/opt/bbbs/bbbs 2 2 ...` de `bbbsd2.service`, o a la línia `ExecStart=/opt/bbbs/bbbsd 3 995 ...` de `bbbsd3.service`, cal ajustar els números d'acord amb la vostra llicència i/o el repartiment de funcions que volgueu fer. Seguint el manual del producte no hi ha misteri, però contacteu-me i us dono un cop de mà.
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#kishpa
|
||||||
|
/opt/bbbs/bbbs 2 2 TCPIP
|
||||||
|
#eof
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue