added APRSGateway

dev
Tom Early 5 years ago
parent 89d8d4db11
commit ea5a62b1dc

@ -42,7 +42,24 @@ In your parent directory of your QnetGateway build...
5) If you are using the YSFGateway cd to that directory and copy the ini file: 5) If you are using the YSFGateway cd to that directory and copy the ini file:
cp YSFGateway.ini YSFGateway.qn cp YSFGateway.ini YSFGateway.qn
Edit this new YSFGateway.qn file for your system. In the [General] section, set your callsign and suffix (either RPT or ND).
In the [Info] section, set your RX & TX frequencies, and any other details
as you like. In the [Log] section, set your log levels as your like, set a
/FULL/PATH/TO/LOGROOTFILE for the log, and define the FileRoot--or disable
logging by setting both DisplayLevel and FileLevel to '0'. in the [Network]
section, set a startup reflector (FCS, YSF or XLX), and set InactivityTimeout
(in minutes) as desired. If the reflector is changed, it will return to the
startup reflector after the inactivity timeout is reached if 'Revert' is set
to '1'. 'Options' allows you to monitor multiple DG-IDs if connected to a YCS
server such as QuadNet's FCS310. You set the TX DG-ID on your radio to which
ever DG-ID you wish to transmit into. This has its benfits and drawbacks.
The to TX DG-ID is a global setting on Yaesu radios, so you cannot save it in
a channel like a DMR talkgroup. You must change the DG-ID in the GM menu each
time. Basically, it is good for monitoring, a little cumbersome for talking.
For [YSFNetwork], set the /FULL/PATH/TO/YSFHosts.txt. And finally for
[FCSNetwork], set the /FULL/PATH/TO/FCSRooms.txt. __NEVER__ connect to a
transcoding reflector network such as QuadNet with more than one mode on the
same MMDVM hotspot/ node/ repeater.
6) Next, your ready to install your software. For that, first move back to the 6) Next, your ready to install your software. For that, first move back to the
QnetGateway directory andstart the administration script: ./qnadmin QnetGateway directory andstart the administration script: ./qnadmin

@ -24,6 +24,7 @@ WWWDIR=/usr/local/www
MMPATH=../MMDVMHost MMPATH=../MMDVMHost
DMRPATH=../DMRGateway DMRPATH=../DMRGateway
YSFPATH=../YSFClients/YSFGateway YSFPATH=../YSFClients/YSFGateway
APRSPATH=../APRSGateway
SYSDIR=/lib/systemd/system SYSDIR=/lib/systemd/system
IRC=ircddb IRC=ircddb
@ -143,7 +144,6 @@ installdmr : $(DMRPATH)/DMRGateway $(DMRPATH)/DMRGateway$(MODULE).qn
systemctl daemon-reload systemctl daemon-reload
systemctl start dmrgateway$(MODULE).service systemctl start dmrgateway$(MODULE).service
installysf : $(YSFPATH)/YSFGateway $(YSFPATH)/YSFGateway$(MODULE).qn installysf : $(YSFPATH)/YSFGateway $(YSFPATH)/YSFGateway$(MODULE).qn
######### YSFGateway ######### ######### YSFGateway #########
/bin/ln -f $(YSFPATH)/YSFGateway $(BINDIR)/YSFGateway$(MODULE) /bin/ln -f $(YSFPATH)/YSFGateway $(BINDIR)/YSFGateway$(MODULE)
@ -154,6 +154,16 @@ installysf : $(YSFPATH)/YSFGateway $(YSFPATH)/YSFGateway$(MODULE).qn
systemctl daemon-reload systemctl daemon-reload
systemctl start ysfgateway$(MODULE).service systemctl start ysfgateway$(MODULE).service
installaprs : $(APRSPATH)/APRSGateway $(APRSPATH)/APRSGateway.qn
######### APRSGateway #########
/bin/cp -f $(APRSPATH)/APRSGateway $(BINDIR)
/bin/ln -f -s $(shell pwd)/$(APRSPATH)/APRSGateway.qn $(CFGDIR)
sed -e "s/XXX/APRSGateway/" -e "s/YYY/APRSGateway/" system/mmdvm.service > $(SYSDIR)/aprsgateway.service
/bin/cp -f system/gateway.timer $(SYSDIR)/aprsgateway.timer
systemctl enable aprsgateway.timer
systemctl daemon-reload
systemctl start aprsgateway.service
installitap : qnitap installitap : qnitap
######### QnetITAP ######### ######### QnetITAP #########
/bin/ln -f qnitap $(BINDIR)/qnitap$(MODULE) /bin/ln -f qnitap $(BINDIR)/qnitap$(MODULE)
@ -263,6 +273,16 @@ uninstallysf :
/bin/rm -f $(CFGDIR)/YSFGateway$(MODULE).qn /bin/rm -f $(CFGDIR)/YSFGateway$(MODULE).qn
sudo systemctl daemon-reload sudo systemctl daemon-reload
uninstallaprs :
######### APRSGateway ##########
systemctl stop aprsgateway.service
systemctl disable aprsgateway.timer
/bin/rm -f $(SYSDIR)/aprsgateway.service
/bin/rm -f $(SYSDIR)/aprsgateway.timer
/bin/rm -f $(BINDIR)/APRSGateway
/bin/rm -f $(CFGDIR)/APRSGateway.qn
sudo systemctl daemon-reload
uninstallmodem : uninstallmodem :
######### QnetModem ######### ######### QnetModem #########
systemctl stop qnmodem$(MODULE).service systemctl stop qnmodem$(MODULE).service

@ -21,6 +21,20 @@ ControlC () {
echo "caught SIGINT" echo "caught SIGINT"
} }
# arguments "un" exe count module0 module1 module2
# 1 2 3 4 5 6
InstallComponent () {
if [ $3 -eq 1 ]; then
sudo make ${1}install$2
else
sudo make MODULE=$4 ${1}install$2
sudo make MODULE=$5 ${1}install$2
if [ $3 -eq 3 ]; then
sudo make MODULE=$6 ${1}install$2
fi
fi
}
InstallMMDVMHosts () { InstallMMDVMHosts () {
if [ $nmmdvm -gt 0 ]; then if [ $nmmdvm -gt 0 ]; then
local n local n
@ -31,7 +45,7 @@ InstallMMDVMHosts () {
fi fi
n=$(getconf _NPROCESSORS_ONLN) n=$(getconf _NPROCESSORS_ONLN)
echo "Detected $n processors for make" echo "Detected $n processors for make"
for dir in ../MMDVMHost ../YSFClients ../DMRGateway; do for dir in $MMPATH $DMRPATH $YSFPATH $APRSPATH; do
if [ -d $dir ]; then if [ -d $dir ]; then
pushd $dir pushd $dir
make -j$n make -j$n
@ -40,37 +54,16 @@ InstallMMDVMHosts () {
done done
fi fi
if [ -e ${MMPATH}/MMDVMHost ]; then if [ -e ${MMPATH}/MMDVMHost ]; then
if [ $nmmdvm -eq 1 ]; then InstallComponent "$1" mmdvm $nmmdvm ${ammdvm[*]}
sudo make ${1}installmmdvm
else
sudo make MODULE=${ammdvm[0]} ${1}installmmdvm
sudo make MODULE=${ammdvm[1]} ${1}installmmdvm
if [ $nmmdvm -eq 3 ]; then
sudo make MODULE=${advap[2]} ${1}installmmdvm
fi
fi
fi fi
if [ -e ${DMRPATH}/DMRGateway ]; then if [ -e ${DMRPATH}/DMRGateway ]; then
if [ $nmmdvm -eq 1 ]; then InstallComponent "$1" dmr $nmmdvm ${ammdvm[*]}
sudo make ${1}installdmr
else
sudo make MODULE=${ammdvm[0]} ${1}installdmr
sudo make MODULE=${ammdvm[1]} ${1}installdmr
if [ $nmmdvm -eq 3 ]; then
sudo make MODULE=${advap[2]} ${1}installdmr
fi
fi
fi fi
if [ -e ${YSFPATH}/YSFGateway ]; then if [ -e ${YSFPATH}/YSFGateway ]; then
if [ $nmmdvm -eq 1 ]; then InstallComponent "$1" ysf $nmmdvm ${ammdvm[*]}
sudo make ${1}installysf
else
sudo make MODULE=${ammdvm[0]} ${1}installysf
sudo make MODULE=${ammdvm[1]} ${1}installysf
if [ $nmmdvm -eq 3 ]; then
sudo make MODULE=${advap[2]} ${1}installysf
fi
fi fi
if [ -e ${APRSPATH}/APRSGateway ]; then
sudo make ${1}installaprs
fi fi
fi fi
} }
@ -87,82 +80,44 @@ InstallSystem () {
if [ -z ${1} ]; then if [ -z ${1} ]; then
make qndvap -j$n make qndvap -j$n
fi fi
if [ $ndvap -eq 1 ]; then InstallComponent "$1" dvap $ndvap ${advap[*]}
sudo make ${1}installdvap
else
sudo make MODULE=${advap[0]} ${1}installdvap
sudo make MODULE=${advap[1]} ${1}installdvap
if [ $ndvap -eq 3 ]; then
sudo make MODULE=${advap[2]} ${1}installdvap
fi
fi
fi fi
if [ $ndvrptr -gt 0 ]; then if [ $ndvrptr -gt 0 ]; then
if [ -z ${1} ]; then if [ -z ${1} ]; then
make qndvrptr -j$n make qndvrptr -j$n
fi fi
if [ $ndvrptr -eq 1 ]; then InstallComponent "$1" dvrptr $ndvrptr ${advrptr[*]}
sudo make ${1}installdvrptr
else
sudo make MODULE=${advrptr[0]} ${1}installdvrptr
sudo make MODULE=${advrptr[1]} ${1}installdvrptr
if [ $ndvrptr -eq 3 ]; then
sudo make MODULE=${advrptr[2]} ${1}installdvrptr
fi
fi
fi fi
if [ $nitap -gt 0 ]; then if [ $nitap -gt 0 ]; then
if [ -z ${1} ]; then if [ -z ${1} ]; then
make qnitap -j$n make qnitap -j$n
fi fi
if [ $nitap -eq 1 ]; then InstallComponent "$1" itap $nitap ${aitap[*]}
sudo make ${1}installitap
else
sudo make MODULE=${aitap[0]} ${1}installitap
sudo make MODULE=${aitap[1]} ${1}installitap
if [ $nitap -eq 3 ]; then
sudo make MODULE=${aitap[2]} ${1}installitap
fi
fi
fi fi
if [ $nmmdvm -gt 0 ]; then if [ $nmmdvm -gt 0 ]; then
if [ -z ${1} ]; then if [ -z ${1} ]; then
make qnrelay -j$n make qnrelay -j$n
fi fi
if [ $nmmdvm -eq 1 ]; then InstallComponent "$1" relay $nmmdvm ${ammdvm[*]}
sudo make ${1}installrelay
else
sudo make MODULE=${ammdvm[0]} ${1}installrelay
sudo make MODULE=${ammdvm[1]} ${1}installrelay
if [ $nmmdvm -eq 3 ]; then
sudo make MODULE=${advap[2]} ${1}installrelay
fi
fi
fi fi
if [ $nmodem -gt 0 ]; then if [ $nmodem -gt 0 ]; then
if [ -z ${1} ]; then if [ -z ${1} ]; then
make qnmodem -j$n make qnmodem -j$n
fi fi
if [ $nmodem -eq 1 ]; then InstallComponent "$1" modem $nmodem ${amodem[*]}
sudo make ${1}installmodem
else
sudo make MODULE=${amodem[0]} ${1}installmodem
sudo make MODULE=${amodem[1]} ${1}installmodem
if [ $nmmdvm -eq 3 ]; then
sudo make MODULE=${amodem[2]} ${1}installmodem
fi
fi
fi fi
} }
BaseStatus () { BaseStatus () {
local LoadGate SubGate LoadLink SubLink LoadDTMF SubDTMF local LoadGate SubGate LoadLink SubLink LoadDTMF SubDTMF LoadAPRS SubAPRS
LoadGate=$( systemctl show -p LoadState --value qngateway ) LoadGate=$( systemctl show -p LoadState --value qngateway )
SubGate=$( systemctl show -p SubState --value qngateway ) SubGate=$( systemctl show -p SubState --value qngateway )
LoadLink=$( systemctl show -p LoadState --value qnlink ) LoadLink=$( systemctl show -p LoadState --value qnlink )
SubLink=$( systemctl show -p SubState --value qnlink ) SubLink=$( systemctl show -p SubState --value qnlink )
LoadDTMF=$( systemctl show -p LoadState --value qndtmf ) LoadDTMF=$( systemctl show -p LoadState --value qndtmf )
SubDTMF=$( systemctl show -p SubState --value qndtmf ) SubDTMF=$( systemctl show -p SubState --value qndtmf )
LoadAPRS=$( systemctl show -p LoadState --value aprsgateway )
SubAPRS=$( systemctl show -p SubState --value aprsgateway )
if [[ $LoadGate == 'loaded' ]]; then if [[ $LoadGate == 'loaded' ]]; then
if [[ $SubGate == 'running' ]]; then if [[ $SubGate == 'running' ]]; then
GateState='running' GateState='running'
@ -192,7 +147,19 @@ BaseStatus () {
else else
DTMFState='not installed' DTMFState='not installed'
fi fi
if [ -d $APRSPATH ]; then
echo "DTMF is $DTMFState" echo "DTMF is $DTMFState"
if [[ $LoadAPRS == 'loaded' ]]; then
if [[ $SubAPRS == 'running' ]]; then
APRSState='running'
else
APRSState='stopped'
fi
else
APRSState='not installed'
fi
echo "APRSGateway is $APRSState"
fi
} }
ModuleStatus () { ModuleStatus () {
@ -207,8 +174,8 @@ ModuleStatus () {
MMDVMState[$1]='EMPTY' MMDVMState[$1]='EMPTY'
DMRProcess[$1]='' DMRProcess[$1]=''
DMRState[$1]='EMPTY' DMRState[$1]='EMPTY'
YSFProcess[i]='' YSFProcess[$1]=''
YSFState[$i]='EMPTY' YSFState[$1]='EMPTY'
if [[ "${ModuleProcess[$1]}" == 'qnmmdvmhost' ]]; then if [[ "${ModuleProcess[$1]}" == 'qnmmdvmhost' ]]; then
ModuleProcess[$1]='qnrelay' ModuleProcess[$1]='qnrelay'
MMDVMProcess[$1]='mmdvm' MMDVMProcess[$1]='mmdvm'
@ -224,6 +191,8 @@ ModuleStatus () {
ModuleProcess[$1]="${ModuleProcess[$1]}${2}" ModuleProcess[$1]="${ModuleProcess[$1]}${2}"
if [[ "${MMDVMProcess[$1]}" == 'mmdvm' ]]; then if [[ "${MMDVMProcess[$1]}" == 'mmdvm' ]]; then
MMDVMProcess[$1]="${MMDVMProcess[$1]}${2}" MMDVMProcess[$1]="${MMDVMProcess[$1]}${2}"
DMRProcess[$1]="${DMRProcess[$1]}${2}"
YSFProcess[$1]="${YSFProcess[$1]}${2}"
fi fi
fi fi
LoadState=$( systemctl show -p LoadState --value ${ModuleProcess[$1]} ) LoadState=$( systemctl show -p LoadState --value ${ModuleProcess[$1]} )
@ -286,7 +255,7 @@ Header () {
if [ ${count} -gt 3 ]; then if [ ${count} -gt 3 ]; then
echo echo
echo "USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND" echo "USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND"
ps -aux | grep -e qngateway -e qnlink -e qndtmf -e qndvap -e qnitap -e qnrelay -e qndvrptr -e qnmodem -e MMDVMHost -e YSFGateway -e DMRGateway | grep -v grep ps -aux | grep -e qngateway -e qnlink -e qndtmf -e qndvap -e qnitap -e qnrelay -e qndvrptr -e qnmodem -e MMDVMHost -e YSFGateway -e DMRGateway -e APRSGateway | grep -v grep
fi fi
echo echo
} }
@ -310,7 +279,7 @@ LogMenu () {
echo " qnlink is not running" echo " qnlink is not running"
fi fi
if [[ $DTMFState == 'running' ]]; then if [[ $DTMFState == 'running' ]]; then
echo " d : qndtmf Log" echo " dt : qndtmf Log"
else else
echo " qndtmf is not running" echo " qndtmf is not running"
fi fi
@ -337,67 +306,74 @@ LogMenu () {
fi fi
if [[ ${MMDVMState[0]} != 'EMPTY' ]]; then if [[ ${MMDVMState[0]} != 'EMPTY' ]]; then
if [[ ${MMDVMState[0]} == 'running' ]]; then if [[ ${MMDVMState[0]} == 'running' ]]; then
echo " r : ${MMDVMProcess[0]} Log" echo " ma : ${MMDVMProcess[0]} Log"
else else
echo " ${MMDVMProcess[0]} is not running" echo " ${MMDVMProcess[0]} is not running"
fi fi
fi fi
if [[ ${MMDVMState[1]} != 'EMPTY' ]]; then if [[ ${MMDVMState[1]} != 'EMPTY' ]]; then
if [[ ${MMDVMState[1]} == 'running' ]]; then if [[ ${MMDVMState[1]} == 'running' ]]; then
echo " s : ${MMDVMProcess[1]} Log" echo " mb : ${MMDVMProcess[1]} Log"
else else
echo " ${MMDVMProcess[1]} is not running" echo " ${MMDVMProcess[1]} is not running"
fi fi
fi fi
if [[ ${MMDVMState[2]} != 'EMPTY' ]]; then if [[ ${MMDVMState[2]} != 'EMPTY' ]]; then
if [[ ${MMDVMState[2]} == 'running' ]]; then if [[ ${MMDVMState[2]} == 'running' ]]; then
echo " t : ${MDVMProcess[2]} Log" echo " mc : ${MDVMProcess[2]} Log"
else else
echo " ${MMDVMProcess[2]} is not running" echo " ${MMDVMProcess[2]} is not running"
fi fi
fi fi
if [[ ${DMRState[0]} != 'EMPTY' ]]; then if [[ ${DMRState[0]} != 'EMPTY' ]]; then
if [[ ${DMRState[0]} == 'running' ]]; then if [[ ${DMRState[0]} == 'running' ]]; then
echo " u : ${DMRProcess[0]} Log" echo " da : ${DMRProcess[0]} Log"
else else
echo " ${DMRProcess[0]} is not running" echo " ${DMRProcess[0]} is not running"
fi fi
fi fi
if [[ ${DMRState[1]} != 'EMPTY' ]]; then if [[ ${DMRState[1]} != 'EMPTY' ]]; then
if [[ ${DMRState[1]} == 'running' ]]; then if [[ ${DMRState[1]} == 'running' ]]; then
echo " v : ${DMRProcess[1]} Log" echo " db : ${DMRProcess[1]} Log"
else else
echo " ${DMRProcess[1]} is not running" echo " ${DMRProcess[1]} is not running"
fi fi
fi fi
if [[ ${DMRState[2]} != 'EMPTY' ]]; then if [[ ${DMRState[2]} != 'EMPTY' ]]; then
if [[ ${DMRState[2]} == 'running' ]]; then if [[ ${DMRState[2]} == 'running' ]]; then
echo " w : ${DMRProcess[2]} Log" echo " dc : ${DMRProcess[2]} Log"
else else
echo " ${DMRProcess[2]} is not running" echo " ${DMRProcess[2]} is not running"
fi fi
fi fi
if [[ ${YSFState[0]} != 'EMPTY' ]]; then if [[ ${YSFState[0]} != 'EMPTY' ]]; then
if [[ ${YSFState[0]} == 'running' ]]; then if [[ ${YSFState[0]} == 'running' ]]; then
echo " x : ${YSFProcess[0]} Log" echo " ya : ${YSFProcess[0]} Log"
else else
echo " ${YSFProcess[0]} is not running" echo " ${YSFProcess[0]} is not running"
fi fi
fi fi
if [[ ${YSFState[1]} != 'EMPTY' ]]; then if [[ ${YSFState[1]} != 'EMPTY' ]]; then
if [[ ${YSFState[1]} == 'running' ]]; then if [[ ${YSFState[1]} == 'running' ]]; then
echo " y : ${YSFProcess[1]} Log" echo " yb : ${YSFProcess[1]} Log"
else else
echo " ${YSFProcess[1]} is not running" echo " ${YSFProcess[1]} is not running"
fi fi
fi fi
if [[ ${YSFState[2]} != 'EMPTY' ]]; then if [[ ${YSFState[2]} != 'EMPTY' ]]; then
if [[ ${YSFState[2]} == 'running' ]]; then if [[ ${YSFState[2]} == 'running' ]]; then
echo " z : ${YSFProcess[2]} Log" echo " yc : ${YSFProcess[2]} Log"
else else
echo " ${Process[2]} is not running" echo " ${Process[2]} is not running"
fi fi
fi fi
if [[ ${APRSState} != 'not installed' ]]; then
if [[ ${APRSState} == 'running' ]]; then
echo " p : APRSGateway Log"
else
echo " APRSGateway is not running"
fi
fi
echo echo
echo " q : quit and return to main menu" echo " q : quit and return to main menu"
echo echo
@ -407,7 +383,7 @@ LogMenu () {
sudo journalctl -u qngateway -f sudo journalctl -u qngateway -f
elif [[ "$ans" == l* ]] && [[ "$LinkState" == 'running' ]]; then elif [[ "$ans" == l* ]] && [[ "$LinkState" == 'running' ]]; then
sudo journalctl -u qnlink -f sudo journalctl -u qnlink -f
elif [[ "$ans" == d* ]] && [[ "$DTMFState" == 'running' ]]; then elif [[ "$ans" == dt* ]] && [[ "$DTMFState" == 'running' ]]; then
sudo journalctl -u qndtmf -f sudo journalctl -u qndtmf -f
elif [[ "$ans" == a* ]] && [[ "${ModuleState[0]}" == 'running' ]]; then elif [[ "$ans" == a* ]] && [[ "${ModuleState[0]}" == 'running' ]]; then
sudo journalctl -u ${ModuleProcess[0]} -f sudo journalctl -u ${ModuleProcess[0]} -f
@ -415,24 +391,26 @@ LogMenu () {
sudo journalctl -u ${ModuleProcess[1]} -f sudo journalctl -u ${ModuleProcess[1]} -f
elif [[ "$ans" == c* ]] && [[ "${ModuleState[2]}" == 'running' ]]; then elif [[ "$ans" == c* ]] && [[ "${ModuleState[2]}" == 'running' ]]; then
sudo journalctl -u ${ModuleProcess[2]} -f sudo journalctl -u ${ModuleProcess[2]} -f
elif [[ "$ans" == r* ]] && [[ "${MMDVMState[0]}" == 'running' ]]; then elif [[ "$ans" == ma* ]] && [[ "${MMDVMState[0]}" == 'running' ]]; then
sudo journalctl -u ${MMDVMProcess[0]} -f sudo journalctl -u ${MMDVMProcess[0]} -f
elif [[ "$ans" == s* ]] && [[ "${MMDVMState[1]}" == 'running' ]]; then elif [[ "$ans" == mb* ]] && [[ "${MMDVMState[1]}" == 'running' ]]; then
sudo journalctl -u ${MMDVMProcess[1]} -f sudo journalctl -u ${MMDVMProcess[1]} -f
elif [[ "$ans" == t* ]] && [[ "${MMDVMState[2]}" == 'running' ]]; then elif [[ "$ans" == mc* ]] && [[ "${MMDVMState[2]}" == 'running' ]]; then
sudo journalctl -u ${MMDVMProcess[2]} -f sudo journalctl -u ${MMDVMProcess[2]} -f
elif [[ "$ans" == u* ]] && [[ "${DMRState[0]}" == 'running' ]]; then elif [[ "$ans" == da* ]] && [[ "${DMRState[0]}" == 'running' ]]; then
sudo journalctl -u ${DMRProcess[0]} -f sudo journalctl -u ${DMRProcess[0]} -f
elif [[ "$ans" == v* ]] && [[ "${DMRState[1]}" == 'running' ]]; then elif [[ "$ans" == db* ]] && [[ "${DMRState[1]}" == 'running' ]]; then
sudo journalctl -u ${DMRProcess[1]} -f sudo journalctl -u ${DMRProcess[1]} -f
elif [[ "$ans" == w* ]] && [[ "${DMRState[2]}" == 'running' ]]; then elif [[ "$ans" == dc* ]] && [[ "${DMRState[2]}" == 'running' ]]; then
sudo journalctl -u ${DMRProcess[2]} -f sudo journalctl -u ${DMRProcess[2]} -f
elif [[ "$ans" == x* ]] && [[ "${YSFState[0]}" == 'running' ]]; then elif [[ "$ans" == ya* ]] && [[ "${YSFState[0]}" == 'running' ]]; then
sudo journalctl -u ${YSFProcess[0]} -f sudo journalctl -u ${YSFProcess[0]} -f
elif [[ "$ans" == y* ]] && [[ "${YSFState[1]}" == 'running' ]]; then elif [[ "$ans" == yb* ]] && [[ "${YSFState[1]}" == 'running' ]]; then
sudo journalctl -u ${YSFProcess[1]} -f sudo journalctl -u ${YSFProcess[1]} -f
elif [[ "$ans" == z* ]] && [[ "${YSFState[2]}" == 'running' ]]; then elif [[ "$ans" == yc* ]] && [[ "${YSFState[2]}" == 'running' ]]; then
sudo journalctl -u ${YSFProcess[2]} -f sudo journalctl -u ${YSFProcess[2]} -f
elif [[ "$ans" == p* ]] && [[ "${APRSState}" == 'running' ]]; then
sudo journalctl -u aprsgateway -f
fi fi
done done
ans='' ans=''
@ -456,9 +434,9 @@ MaintenanceMenu () {
echo " l : Start QnetLink" echo " l : Start QnetLink"
fi fi
if [[ "$DTMFState" == 'running' ]]; then if [[ "$DTMFState" == 'running' ]]; then
echo " d : Stop DTMF" echo " dt : Stop DTMF"
elif [[ "$DTMFState" == 'stopped' ]]; then elif [[ "$DTMFState" == 'stopped' ]]; then
echo " d : Start DTMF" echo " dt : Start DTMF"
fi fi
if [[ "${ModuleState[0]}" == 'running' ]]; then if [[ "${ModuleState[0]}" == 'running' ]]; then
echo " a : Stop Module A" echo " a : Stop Module A"
@ -476,49 +454,54 @@ MaintenanceMenu () {
echo " c : Start Module C" echo " c : Start Module C"
fi fi
if [[ "${MMDVMState[0]}" == 'running' ]]; then if [[ "${MMDVMState[0]}" == 'running' ]]; then
echo " r : Stop MMDVMHost A" echo " ma : Stop MMDVMHost A"
elif [[ "${MMDVMState[0]}" == 'stopped' ]]; then elif [[ "${MMDVMState[0]}" == 'stopped' ]]; then
echo " r : Start MMDVMHost A" echo " ma : Start MMDVMHost A"
fi fi
if [[ "${MMDVMState[1]}" == 'running' ]]; then if [[ "${MMDVMState[1]}" == 'running' ]]; then
echo " s : Stop MMDVMHost B" echo " mb : Stop MMDVMHost B"
elif [[ "${MMDVMState[1]}" == 'stopped' ]]; then elif [[ "${MMDVMState[1]}" == 'stopped' ]]; then
echo " s : Start MMDVMHost B" echo " mb : Start MMDVMHost B"
fi fi
if [[ "${MMDVMState[2]}" == 'running' ]]; then if [[ "${MMDVMState[2]}" == 'running' ]]; then
echo " t : Stop MMDVMHost C" echo " mc : Stop MMDVMHost C"
elif [[ "${MMDVMState[2]}" == 'stopped' ]]; then elif [[ "${MMDVMState[2]}" == 'stopped' ]]; then
echo " t : Start MMDVMHost C" echo " mc : Start MMDVMHost C"
fi fi
if [[ "${DMRState[0]}" == 'running' ]]; then if [[ "${DMRState[0]}" == 'running' ]]; then
echo " u : Stop DMRGateway A" echo " da : Stop DMRGateway A"
elif [[ "${DMRState[0]}" == 'stopped' ]]; then elif [[ "${DMRState[0]}" == 'stopped' ]]; then
echo " u : Start DMRGateway A" echo " da : Start DMRGateway A"
fi fi
if [[ "${DMRState[1]}" == 'running' ]]; then if [[ "${DMRState[1]}" == 'running' ]]; then
echo " v : Stop DMRGateway B" echo " db : Stop DMRGateway B"
elif [[ "${DMRState[1]}" == 'stopped' ]]; then elif [[ "${DMRState[1]}" == 'stopped' ]]; then
echo " v : Start DMRGateway B" echo " db : Start DMRGateway B"
fi fi
if [[ "${DMRState[2]}" == 'running' ]]; then if [[ "${DMRState[2]}" == 'running' ]]; then
echo " w : Stop DMRGateway C" echo " dc : Stop DMRGateway C"
elif [[ "${DMRState[2]}" == 'stopped' ]]; then elif [[ "${DMRState[2]}" == 'stopped' ]]; then
echo " w : Start DMRGateway C" echo " dc : Start DMRGateway C"
fi fi
if [[ "${YSFState[0]}" == 'running' ]]; then if [[ "${YSFState[0]}" == 'running' ]]; then
echo " x : Stop YSFGateway A" echo " ya : Stop YSFGateway A"
elif [[ "${YSFState[0]}" == 'stopped' ]]; then elif [[ "${YSFState[0]}" == 'stopped' ]]; then
echo " x : Start YSFGateway A" echo " ys : Start YSFGateway A"
fi fi
if [[ "${YSFState[1]}" == 'running' ]]; then if [[ "${YSFState[1]}" == 'running' ]]; then
echo " y : Stop YSFGateway B" echo " yb : Stop YSFGateway B"
elif [[ "${YSFState[1]}" == 'stopped' ]]; then elif [[ "${YSFState[1]}" == 'stopped' ]]; then
echo " y : Start YSFGateway B" echo " yb : Start YSFGateway B"
fi fi
if [[ "${YSFState[2]}" == 'running' ]]; then if [[ "${YSFState[2]}" == 'running' ]]; then
echo " z : Stop YSFGateway C" echo " yc : Stop YSFGateway C"
elif [[ "${YSFState[2]}" == 'stopped' ]]; then elif [[ "${YSFState[2]}" == 'stopped' ]]; then
echo " z : Start YSFGateway C" echo " yc : Start YSFGateway C"
fi
if [[ "${APRSState}" == 'running' ]]; then
echo " p : Stop APRSGateway"
elif [[ "${APRSState}" == 'stopped' ]]; then
echo " p : Start APRSGateway"
fi fi
echo echo
echo " q : Return to main Menu" echo " q : Return to main Menu"
@ -539,7 +522,7 @@ MaintenanceMenu () {
sudo systemctl start qnlink sudo systemctl start qnlink
fi fi
BaseStatus BaseStatus
elif [[ "$ans" == d* ]]; then elif [[ "$ans" == dt* ]]; then
if [[ "$DTMFState" == 'running' ]]; then if [[ "$DTMFState" == 'running' ]]; then
sudo systemctl stop qndtmf sudo systemctl stop qndtmf
elif [[ "$DTMFState" == 'stopped' ]]; then elif [[ "$DTMFState" == 'stopped' ]]; then
@ -567,69 +550,76 @@ MaintenanceMenu () {
sudo systemctl start ${ModuleProcess[2]} sudo systemctl start ${ModuleProcess[2]}
fi fi
ModuleStatus 2 c $module_c ModuleStatus 2 c $module_c
elif [[ "$ans" == r* ]] && [ -n $module_a ]; then elif [[ "$ans" == ma* ]] && [ -n $module_a ]; then
if [[ "${MMDVMState[0]}" == 'running' ]]; then if [[ "${MMDVMState[0]}" == 'running' ]]; then
sudo systemctl stop ${MMDVMProcess[0]} sudo systemctl stop ${MMDVMProcess[0]}
elif [[ "${MMDVMState[0]}" == 'stopped' ]]; then elif [[ "${MMDVMState[0]}" == 'stopped' ]]; then
sudo systemctl start ${MMDVMProcess[0]} sudo systemctl start ${MMDVMProcess[0]}
fi fi
ModuleStatus 0 a $module_a ModuleStatus 0 a $module_a
elif [[ "$ans" == s* ]] && [ -n $module_b ]; then elif [[ "$ans" == mb* ]] && [ -n $module_b ]; then
if [[ "${MMDVMState[1]}" == 'running' ]]; then if [[ "${MMDVMState[1]}" == 'running' ]]; then
sudo systemctl stop ${MMDVMProcess[1]} sudo systemctl stop ${MMDVMProcess[1]}
elif [[ "${MMDVMState[1]}" == 'stopped' ]]; then elif [[ "${MMDVMState[1]}" == 'stopped' ]]; then
sudo systemctl start ${MMDVMProcess[1]} sudo systemctl start ${MMDVMProcess[1]}
fi fi
ModuleStatus 1 b $module_b ModuleStatus 1 b $module_b
elif [[ "$ans" == r* ]] && [ -n $module_c ]; then elif [[ "$ans" == mc* ]] && [ -n $module_c ]; then
if [[ "${MMDVMState[2]}" == 'running' ]]; then if [[ "${MMDVMState[2]}" == 'running' ]]; then
sudo systemctl stop ${MMDVMProcess[2]} sudo systemctl stop ${MMDVMProcess[2]}
elif [[ "${MMDVMState[2]}" == 'stopped' ]]; then elif [[ "${MMDVMState[2]}" == 'stopped' ]]; then
sudo systemctl start ${MMDVMProcess[2]} sudo systemctl start ${MMDVMProcess[2]}
fi fi
ModuleStatus 2 c $module_c ModuleStatus 2 c $module_c
elif [[ "$ans" == u* ]] && [ -n $module_a ]; then elif [[ "$ans" == da* ]] && [ -n $module_a ]; then
if [[ "${DMRState[0]}" == 'running' ]]; then if [[ "${DMRState[0]}" == 'running' ]]; then
sudo systemctl stop ${DMRProcess[0]} sudo systemctl stop ${DMRProcess[0]}
elif [[ "${DMRState[0]}" == 'stopped' ]]; then elif [[ "${DMRState[0]}" == 'stopped' ]]; then
sudo systemctl start ${DMRrocess[0]} sudo systemctl start ${DMRrocess[0]}
fi fi
ModuleStatus 0 a $module_a ModuleStatus 0 a $module_a
elif [[ "$ans" == v* ]] && [ -n $module_b ]; then elif [[ "$ans" == db* ]] && [ -n $module_b ]; then
if [[ "${DMRState[1]}" == 'running' ]]; then if [[ "${DMRState[1]}" == 'running' ]]; then
sudo systemctl stop ${DMRProcess[1]} sudo systemctl stop ${DMRProcess[1]}
elif [[ "${DMRState[1]}" == 'stopped' ]]; then elif [[ "${DMRState[1]}" == 'stopped' ]]; then
sudo systemctl start ${DMRProcess[1]} sudo systemctl start ${DMRProcess[1]}
fi fi
ModuleStatus 1 b $module_b ModuleStatus 1 b $module_b
elif [[ "$ans" == w* ]] && [ -n $module_c ]; then elif [[ "$ans" == dc* ]] && [ -n $module_c ]; then
if [[ "${DMRState[2]}" == 'running' ]]; then if [[ "${DMRState[2]}" == 'running' ]]; then
sudo systemctl stop ${DMRProcess[2]} sudo systemctl stop ${DMRProcess[2]}
elif [[ "${DMRState[2]}" == 'stopped' ]]; then elif [[ "${DMRState[2]}" == 'stopped' ]]; then
sudo systemctl start ${DMRProcess[2]} sudo systemctl start ${DMRProcess[2]}
fi fi
ModuleStatus 2 c $module_c ModuleStatus 2 c $module_c
elif [[ "$ans" == x* ]] && [ -n $module_a ]; then elif [[ "$ans" == ya* ]] && [ -n $module_a ]; then
if [[ "${YSFState[0]}" == 'running' ]]; then if [[ "${YSFState[0]}" == 'running' ]]; then
sudo systemctl stop ${YSFProcess[0]} sudo systemctl stop ${YSFProcess[0]}
elif [[ "${YSFState[0]}" == 'stopped' ]]; then elif [[ "${YSFState[0]}" == 'stopped' ]]; then
sudo systemctl start ${YSFProcess[0]} sudo systemctl start ${YSFProcess[0]}
fi fi
ModuleStatus 0 a $module_a ModuleStatus 0 a $module_a
elif [[ "$ans" == y* ]] && [ -n $module_b ]; then elif [[ "$ans" == yb* ]] && [ -n $module_b ]; then
if [[ "${YSFState[1]}" == 'running' ]]; then if [[ "${YSFState[1]}" == 'running' ]]; then
sudo systemctl stop ${YSFProcess[1]} sudo systemctl stop ${YSFProcess[1]}
elif [[ "${YSFState[1]}" == 'stopped' ]]; then elif [[ "${YSFState[1]}" == 'stopped' ]]; then
sudo systemctl start ${YSFProcess[1]} sudo systemctl start ${YSFProcess[1]}
fi fi
ModuleStatus 1 b $module_b ModuleStatus 1 b $module_b
elif [[ "$ans" == z* ]] && [ -n $module_c ]; then elif [[ "$ans" == yc* ]] && [ -n $module_c ]; then
if [[ "${YSFState[2]}" == 'running' ]]; then if [[ "${YSFState[2]}" == 'running' ]]; then
sudo systemctl stop ${YSFProcess[2]} sudo systemctl stop ${YSFProcess[2]}
elif [[ "${YSFState[2]}" == 'stopped' ]]; then elif [[ "${YSFState[2]}" == 'stopped' ]]; then
sudo systemctl start ${YSFProcess[2]} sudo systemctl start ${YSFProcess[2]}
fi fi
ModuleStatus 2 c $module_c ModuleStatus 2 c $module_c
elif [[ "$ans" == p* ]]; then
if [[ "${APRSState}" == 'running' ]]; then
sudo systemctl stop ${APRSProcess}
elif [[ "${APRSState}" == 'stopped' ]]; then
sudo systemctl start ${APRSProcess}
fi
BaseStatus
fi fi
done done
ans='' ans=''
@ -742,7 +732,7 @@ else
echo "ERROR: There is no Makefile or makefile" echo "ERROR: There is no Makefile or makefile"
exit 1 exit 1
fi fi
source <( grep -e '^BINDIR=' -e '^MMPATH=' -e '^DMRPATH=' -e '^YSFPATH=' $MAKEFILE ) source <( grep -e '^BINDIR=' -e '^MMPATH=' -e '^DMRPATH=' -e '^YSFPATH=' -e '^APRSPATH' $MAKEFILE )
if [ -z $BINDIR ]; then if [ -z $BINDIR ]; then
echo "ERROR: The BINDIR definition in $MAKEFILE is empty!" echo "ERROR: The BINDIR definition in $MAKEFILE is empty!"
exit 1 exit 1

Loading…
Cancel
Save

Powered by TurnKey Linux.