mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
BBS - Added a BBS Client (Paracon) to et-mode
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
[Setup]
|
||||||
|
host = localhost
|
||||||
|
callsign = N0CALL
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 6 November 2024
|
# Date : 6 November 2024
|
||||||
# Updated : 20 November 2024
|
# Updated : 3 December 2024
|
||||||
# Purpose : Configures the system for a specific mode of operation
|
# Purpose : Configures the system for a specific mode of operation
|
||||||
|
|
||||||
# Use a simple text file to save the state of the last mode selected
|
# 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_NONE="none"
|
||||||
MODE_ID_APRS_DIGIPEATER="aprs-digipeater"
|
MODE_ID_APRS_DIGIPEATER="aprs-digipeater"
|
||||||
MODE_ID_APRS_CLIENT="aprs-client"
|
MODE_ID_APRS_CLIENT="aprs-client"
|
||||||
|
MODE_ID_BBS_CLIENT="bbs-client"
|
||||||
MODE_ID_PACKET_DIGIPEATER="packet-digipeater"
|
MODE_ID_PACKET_DIGIPEATER="packet-digipeater"
|
||||||
MODE_ID_WINLINK_ARDOP="winlink-ardop"
|
MODE_ID_WINLINK_ARDOP="winlink-ardop"
|
||||||
MODE_ID_WINLINK_PACKET="winlink-packet"
|
MODE_ID_WINLINK_PACKET="winlink-packet"
|
||||||
@@ -64,6 +65,7 @@ start_and_wait_for_service() {
|
|||||||
options=()
|
options=()
|
||||||
options+=("${MODE_ID_NONE}" "No mode selected")
|
options+=("${MODE_ID_NONE}" "No mode selected")
|
||||||
options+=("${MODE_ID_APRS_CLIENT}" "APRS Client (YAAC)")
|
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_APRS_DIGIPEATER}" "APRS Digipeater")
|
||||||
options+=("${MODE_ID_PACKET_DIGIPEATER}" "Packet Digipeater")
|
options+=("${MODE_ID_PACKET_DIGIPEATER}" "Packet Digipeater")
|
||||||
options+=("${MODE_ID_WINLINK_ARDOP}" "Winlink over HF (ARDOP)")
|
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
|
start_and_wait_for_service et-service-direwolf-simple
|
||||||
et-yaac start
|
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})
|
${MODE_ID_PACKET_DIGIPEATER})
|
||||||
systemctl --user start et-service-direwolf-packet-digipeater
|
systemctl --user start et-service-direwolf-packet-digipeater
|
||||||
et-log "Packet digipeater now running."
|
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
|
# Author : Gaston Gonzalez
|
||||||
# Date : 6 October 2024
|
# Date : 6 October 2024
|
||||||
# Updated : 21 November 2024
|
# Updated : 3 December 2024
|
||||||
# Purpose : Utility script for dumping system information
|
# Purpose : Utility script for dumping system information
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
@@ -176,6 +176,7 @@ case $1 in
|
|||||||
|
|
||||||
MODE_ID_NONE="none"
|
MODE_ID_NONE="none"
|
||||||
MODE_ID_APRS_DIGIPEATER="aprs-digipeater"
|
MODE_ID_APRS_DIGIPEATER="aprs-digipeater"
|
||||||
|
MODE_ID_BBS_CLIENT="bbs-client"
|
||||||
MODE_ID_PACKET_DIGIPEATER="packet-digipeater"
|
MODE_ID_PACKET_DIGIPEATER="packet-digipeater"
|
||||||
MODE_ID_APRS_CLIENT="aprs-client"
|
MODE_ID_APRS_CLIENT="aprs-client"
|
||||||
MODE_ID_WINLINK_ARDOP="winlink-ardop"
|
MODE_ID_WINLINK_ARDOP="winlink-ardop"
|
||||||
@@ -197,6 +198,9 @@ case $1 in
|
|||||||
${MODE_ID_APRS_CLIENT})
|
${MODE_ID_APRS_CLIENT})
|
||||||
echo "APRS"
|
echo "APRS"
|
||||||
;;
|
;;
|
||||||
|
${MODE_ID_BBS_CLIENT})
|
||||||
|
echo "BBS Client"
|
||||||
|
;;
|
||||||
${MODE_ID_PACKET_DIGIPEATER})
|
${MODE_ID_PACKET_DIGIPEATER})
|
||||||
echo "Packet Digipeater"
|
echo "Packet Digipeater"
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user