mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
Merge pull request #12 from thetechprepper/feature/bbs
Merging feature/bbs branch into release/r4
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
[Setup]
|
||||
host = localhost
|
||||
callsign = N0CALL
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 6 November 2024
|
||||
# Updated : 20 November 2024
|
||||
# Updated : 3 December 2024
|
||||
# Purpose : Configures the system for a specific mode of operation
|
||||
|
||||
# Use a simple text file to save the state of the last mode selected
|
||||
@@ -12,6 +12,7 @@ MODE_STATUS_FILE="${HOME}/.config/emcomm-tools/et-mode"
|
||||
MODE_ID_NONE="none"
|
||||
MODE_ID_APRS_DIGIPEATER="aprs-digipeater"
|
||||
MODE_ID_APRS_CLIENT="aprs-client"
|
||||
MODE_ID_BBS_CLIENT="bbs-client"
|
||||
MODE_ID_PACKET_DIGIPEATER="packet-digipeater"
|
||||
MODE_ID_WINLINK_ARDOP="winlink-ardop"
|
||||
MODE_ID_WINLINK_PACKET="winlink-packet"
|
||||
@@ -64,6 +65,7 @@ start_and_wait_for_service() {
|
||||
options=()
|
||||
options+=("${MODE_ID_NONE}" "No mode selected")
|
||||
options+=("${MODE_ID_APRS_CLIENT}" "APRS Client (YAAC)")
|
||||
options+=("${MODE_ID_BBS_CLIENT}" "BBS Client (Paracon)")
|
||||
options+=("${MODE_ID_APRS_DIGIPEATER}" "APRS Digipeater")
|
||||
options+=("${MODE_ID_PACKET_DIGIPEATER}" "Packet Digipeater")
|
||||
options+=("${MODE_ID_WINLINK_ARDOP}" "Winlink over HF (ARDOP)")
|
||||
@@ -93,6 +95,11 @@ if [ $exit_status -eq 0 ]; then
|
||||
start_and_wait_for_service et-service-direwolf-simple
|
||||
et-yaac start
|
||||
;;
|
||||
${MODE_ID_BBS_CLIENT})
|
||||
start_and_wait_for_service et-service-direwolf-simple
|
||||
et-log "Starting Paracon."
|
||||
et-paracon start
|
||||
;;
|
||||
${MODE_ID_PACKET_DIGIPEATER})
|
||||
systemctl --user start et-service-direwolf-packet-digipeater
|
||||
et-log "Packet digipeater now running."
|
||||
|
||||
Executable
+93
@@ -0,0 +1,93 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 3 December 2024
|
||||
# Purpose : Wrapper script for starting Paracon with PnP support
|
||||
#
|
||||
# Preconditions:
|
||||
# 1. Supported radio and audio interface are connected and properly detected
|
||||
# 2. Dire Wolf is started
|
||||
#
|
||||
# Postconditions:
|
||||
# 1. Callsign and AGWPE host updated in Paracon
|
||||
# 2. Paracon is started
|
||||
|
||||
PARACON_CONF_DIR=${HOME}/.local/share/emcomm-tools/bbs-client
|
||||
PARACON_CONF_FILE=${PARACON_CONF_DIR}/paracon.cfg
|
||||
|
||||
usage() {
|
||||
echo "usage: $(basename $0) <command>"
|
||||
echo " <command>"
|
||||
echo " start - Start Paracon"
|
||||
echo " update-config - Update configuration for selected mode"
|
||||
}
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
notify_user() {
|
||||
notify-send \
|
||||
-t 5000 \
|
||||
--app-name="EmComm Tools" \
|
||||
"$1"
|
||||
}
|
||||
|
||||
start() {
|
||||
update-config
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
|
||||
RIGCTLD_OUT=$(ps -ef | grep [d]irewolf)
|
||||
if [ $? -ne 0 ]; then
|
||||
et-log "Can't start Paracon. Dire Wolf not running."
|
||||
notify_user "Can't start Paracon. Dire Wolf not running."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CWD_DIR=$(pwd)
|
||||
|
||||
cd ${PARACON_CONF_DIR}
|
||||
CMD="paracon"
|
||||
et-log "Starting Paracon in ${PARACON_CONF_DIR} with: ${CMD}"
|
||||
|
||||
${CMD}
|
||||
|
||||
cd ${CWD_DIR}
|
||||
|
||||
else
|
||||
et-log "Error updating configuration. Can't start Paracon"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
update-config () {
|
||||
|
||||
[ -z "$ET_USER_CONFIG" ] && ET_USER_CONFIG="${HOME}/.config/emcomm-tools/user.json"
|
||||
|
||||
CALLSIGN=$(cat ${ET_USER_CONFIG} | jq -r .callsign)
|
||||
|
||||
if [ "${CALLSIGN}" = "N0CALL" ]; then
|
||||
notify_user "Can't start Paracon. No callsign set. Run: et-user."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
et-log "Updating Paracon configuration file: ${PARACON_CONF_FILE}..."
|
||||
sed -i "s|^host.*|host = localhost|" ${PARACON_CONF_FILE}
|
||||
sed -i "s|^callsign.*|callsign = ${CALLSIGN}|" ${PARACON_CONF_FILE}
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
update-config)
|
||||
update-config
|
||||
;;
|
||||
*)
|
||||
echo "Invalid command."
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 6 October 2024
|
||||
# Updated : 21 November 2024
|
||||
# Updated : 3 December 2024
|
||||
# Purpose : Utility script for dumping system information
|
||||
|
||||
function usage() {
|
||||
@@ -176,6 +176,7 @@ case $1 in
|
||||
|
||||
MODE_ID_NONE="none"
|
||||
MODE_ID_APRS_DIGIPEATER="aprs-digipeater"
|
||||
MODE_ID_BBS_CLIENT="bbs-client"
|
||||
MODE_ID_PACKET_DIGIPEATER="packet-digipeater"
|
||||
MODE_ID_APRS_CLIENT="aprs-client"
|
||||
MODE_ID_WINLINK_ARDOP="winlink-ardop"
|
||||
@@ -197,6 +198,9 @@ case $1 in
|
||||
${MODE_ID_APRS_CLIENT})
|
||||
echo "APRS"
|
||||
;;
|
||||
${MODE_ID_BBS_CLIENT})
|
||||
echo "BBS Client"
|
||||
;;
|
||||
${MODE_ID_PACKET_DIGIPEATER})
|
||||
echo "Packet Digipeater"
|
||||
;;
|
||||
|
||||
Executable
+47
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 8 November 2024
|
||||
# Updated : 28 November 2024
|
||||
# Purpose : Install Linbpq
|
||||
#
|
||||
# Notes:
|
||||
# These build steps are partially based on an article by the Modern Ham (KN4MKB).
|
||||
# https://themodernham.com/install-linbpq-bbs-packet-node-on-debian-ubuntu-and-raspbian/
|
||||
|
||||
VERSION=latest
|
||||
FILE=linbpq
|
||||
LINK_PATH=/opt/linbpq
|
||||
INSTALL_DIR=/opt/linbpq-${VERSION}
|
||||
INSTALL_BIN_DIR=${INSTALL_DIR}/bin
|
||||
|
||||
et-log "Installing Dan Bernstein's tcpserver..."
|
||||
apt install ucspi-tcp -y
|
||||
|
||||
et-log "Installing Linbpq..."
|
||||
|
||||
et-log "Installing 32-bit dependencies for Linbpq..."
|
||||
dpkg --add-architecture i386 && apt update && apt install \
|
||||
libpcap0.8-dev:i386 \
|
||||
libasound2-dev:i386 \
|
||||
libz3-4:i386 \
|
||||
zlib1g:i386 \
|
||||
-y
|
||||
|
||||
URL="https://www.cantab.net/users/john.wiseman/Downloads/${FILE}"
|
||||
|
||||
if [ ! -e ${FILE} ]; then
|
||||
et-log "Downloading Linbpq: ${URL}"
|
||||
curl -s -L -o ${FILE} --fail ${URL}
|
||||
fi
|
||||
|
||||
[ ! -e ${INSTALL_BIN_DIR} ] && mkdir -v -p ${INSTALL_BIN_DIR}
|
||||
chmod 755 ${FILE} && mv -v ${FILE} ${INSTALL_BIN_DIR}
|
||||
|
||||
CWD_DIR=$(pwd)
|
||||
|
||||
[ -e ${LINK_PATH} ] && rm ${LINK_PATH}
|
||||
ln -s ${INSTALL_DIR} ${LINK_PATH}
|
||||
|
||||
stow -v -d /opt linbpq -t /usr/local
|
||||
|
||||
cd ${CWD_DIR}
|
||||
+2
-1
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 16 March 2024
|
||||
# Updated : 22 November 2024
|
||||
# Updated : 28 November 2024
|
||||
# Purpose : Main installer for EmComm Tools OS Community
|
||||
|
||||
. ./env.sh
|
||||
@@ -39,6 +39,7 @@ exitIfNotRoot
|
||||
./install-direwolf.sh
|
||||
./install-yaac.sh
|
||||
./install-bbs-client.sh
|
||||
./install-bbs-server.sh
|
||||
|
||||
# Install modems
|
||||
./install-ardop.sh
|
||||
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
# Author : Gaston Gonzalez
|
||||
# Date : 28 November 2024
|
||||
# Purpose : Test linbpq installation
|
||||
|
||||
OUT=$(which linbpq)
|
||||
exit $?
|
||||
Reference in New Issue
Block a user