mirror of https://gitlab.com/hp3icc/emq-TE1.git
update
This commit is contained in:
parent
06bfc17e90
commit
7935e67eb8
283
install/mmdvm.sh
283
install/mmdvm.sh
|
|
@ -625,231 +625,108 @@ EOF
|
||||||
#
|
#
|
||||||
#####################################################################################################################
|
#####################################################################################################################
|
||||||
|
|
||||||
cat > /opt/data-file.sh <<- "EOFXC"
|
cat > /opt/data-mmdvm.py <<- "EOFXC"
|
||||||
#!/bin/bash
|
import os
|
||||||
#########################################################
|
import subprocess
|
||||||
# #
|
|
||||||
# HostFilesUpdate.sh Updater #
|
|
||||||
# #
|
|
||||||
# Written for Pi-Star (http://www.pistar.uk/) #
|
|
||||||
# By Andy Taylor (MW0MWZ) #
|
|
||||||
# #
|
|
||||||
# Version 2.6 #
|
|
||||||
# #
|
|
||||||
# Based on the update script by Tony Corbett G0WFV #
|
|
||||||
# #
|
|
||||||
#########################################################
|
|
||||||
|
|
||||||
# Check that the network is UP and die if its not
|
APRSHOSTS = "/opt/data-files/APRSHosts.txt"
|
||||||
#if [ "$(expr length `hostname -I | cut -d' ' -f1`x)" == "1" ]; then
|
DCSHOSTS = "/opt/data-files/DCS_Hosts.txt"
|
||||||
# exit 0
|
DExtraHOSTS = "/opt/data-files/DExtra_Hosts.txt"
|
||||||
#fi
|
DMRIDFILE = "/opt/data-files/DMRIds.dat"
|
||||||
|
DMRHOSTS = "/opt/data-files/DMR_Hosts.txt"
|
||||||
# Get the Pi-Star Version
|
DPlusHOSTS = "/opt/data-files/DPlus_Hosts.txt"
|
||||||
#pistarCurVersion=$(awk -F "= " '/Version/ {print $2}' /etc/pistar-release)
|
P25HOSTS = "/opt/data-files/P25Hosts.txt"
|
||||||
|
M17HOSTS = "/opt/data-files/M17Hosts.txt"
|
||||||
APRSHOSTS=/opt/data-files/APRSHosts.txt
|
YSFHOSTS = "/opt/data-files/YSFHosts.txt"
|
||||||
DCSHOSTS=/opt/data-files/DCS_Hosts.txt
|
FCSHOSTS = "/opt/data-files/FCSHosts.txt"
|
||||||
DExtraHOSTS=/opt/data-files/DExtra_Hosts.txt
|
XLXHOSTS = "/opt/data-files/XLXHosts.txt"
|
||||||
DMRIDFILE=/opt/data-files/DMRIds.dat
|
NXDNIDFILE = "/opt/data-files/NXDN.csv"
|
||||||
DMRHOSTS=/opt/data-files/DMR_Hosts.txt
|
NXDNHOSTS = "/opt/data-files/NXDNHosts.txt"
|
||||||
DPlusHOSTS=/opt/data-files/DPlus_Hosts.txt
|
TGLISTBM = "/opt/data-files/TGList_BM.txt"
|
||||||
P25HOSTS=/opt/data-files/P25Hosts.txt
|
TGLISTDMR = "/opt/data-files/TGList-DMR.txt"
|
||||||
M17HOSTS=/opt/data-files/M17Hosts.txt
|
TGLISTP25 = "/opt/data-files/TGList_P25.txt"
|
||||||
YSFHOSTS=/opt/data-files/YSFHosts.txt
|
TGLISTNXDN = "/opt/data-files/TGList_NXDN.txt"
|
||||||
FCSHOSTS=/opt/data-files/FCSHosts.txt
|
TGLISTYSF = "/opt/data-files/TGList_YSF.txt"
|
||||||
XLXHOSTS=/opt/data-files/XLXHosts.txt
|
|
||||||
NXDNIDFILE=/opt/data-files/NXDN.csv
|
|
||||||
NXDNHOSTS=/opt/data-files/NXDNHosts.txt
|
|
||||||
TGLISTBM=/opt/data-files/TGList_BM.txt
|
|
||||||
TGLISTDMR=/opt/data-files/TGList-DMR.txt
|
|
||||||
TGLISTP25=/opt/data-files/TGList_P25.txt
|
|
||||||
TGLISTNXDN=/opt/data-files/TGList_NXDN.txt
|
|
||||||
TGLISTYSF=/opt/data-files/TGList_YSF.txt
|
|
||||||
|
|
||||||
# How many backups
|
# How many backups
|
||||||
FILEBACKUP=1
|
FILEBACKUP = 1
|
||||||
|
|
||||||
# Check we are root
|
# Check if the script is running as root
|
||||||
if [ "$(id -u)" != "0" ];then
|
if os.geteuid() != 0:
|
||||||
echo "This script must be run as root" 1>&2
|
print("This script must be run as root")
|
||||||
exit 1
|
exit(1)
|
||||||
fi
|
|
||||||
|
|
||||||
# Create backup of old files
|
# Create backup of old files
|
||||||
if [ ${FILEBACKUP} -ne 0 ]; then
|
if FILEBACKUP != 0:
|
||||||
cp ${APRSHOSTS} ${APRSHOSTS}.$(date +%Y%m%d)
|
files_to_backup = [
|
||||||
cp ${DCSHOSTS} ${DCSHOSTS}.$(date +%Y%m%d)
|
APRSHOSTS, DCSHOSTS, DExtraHOSTS, DMRIDFILE, DMRHOSTS,
|
||||||
cp ${DExtraHOSTS} ${DExtraHOSTS}.$(date +%Y%m%d)
|
DPlusHOSTS, P25HOSTS, M17HOSTS, YSFHOSTS, FCSHOSTS,
|
||||||
cp ${DMRIDFILE} ${DMRIDFILE}.$(date +%Y%m%d)
|
XLXHOSTS, NXDNIDFILE, NXDNHOSTS, TGLISTBM, TGLISTDMR,
|
||||||
cp ${DMRHOSTS} ${DMRHOSTS}.$(date +%Y%m%d)
|
TGLISTP25, TGLISTNXDN, TGLISTYSF
|
||||||
cp ${DPlusHOSTS} ${DPlusHOSTS}.$(date +%Y%m%d)
|
]
|
||||||
cp ${P25HOSTS} ${P25HOSTS}.$(date +%Y%m%d)
|
|
||||||
cp ${M17HOSTS} ${M17HOSTS}.$(date +%Y%m%d)
|
|
||||||
cp ${YSFHOSTS} ${YSFHOSTS}.$(date +%Y%m%d)
|
|
||||||
cp ${FCSHOSTS} ${FCSHOSTS}.$(date +%Y%m%d)
|
|
||||||
cp ${XLXHOSTS} ${XLXHOSTS}.$(date +%Y%m%d)
|
|
||||||
cp ${NXDNIDFILE} ${NXDNIDFILE}.$(date +%Y%m%d)
|
|
||||||
cp ${NXDNHOSTS} ${NXDNHOSTS}.$(date +%Y%m%d)
|
|
||||||
cp ${TGLISTBM} ${TGLISTBM}.$(date +%Y%m%d)
|
|
||||||
cp ${TGLISTDMR} ${TGLISTDMR}.$(date +%Y%m%d)
|
|
||||||
cp ${TGLISTP25} ${TGLISTP25}.$(date +%Y%m%d)
|
|
||||||
cp ${TGLISTNXDN} ${TGLISTNXDN}.$(date +%Y%m%d)
|
|
||||||
cp ${TGLISTYSF} ${TGLISTYSF}.$(date +%Y%m%d)
|
|
||||||
|
|
||||||
fi
|
for file in files_to_backup:
|
||||||
|
backup_filename = f"{file}.{subprocess.check_output(['date', '+%Y%m%d']).decode().strip()}"
|
||||||
|
subprocess.run(['cp', file, backup_filename])
|
||||||
|
|
||||||
# Prune backups
|
# Prune backups
|
||||||
FILES="${APRSHOSTS}
|
for file in files_to_backup:
|
||||||
${DCSHOSTS}
|
backup_count = len([f for f in os.listdir() if f.startswith(f"{file}.")])
|
||||||
${DExtraHOSTS}
|
backups_to_delete = backup_count - FILEBACKUP
|
||||||
${DMRIDFILE}
|
|
||||||
${DMRHOSTS}
|
|
||||||
${DPlusHOSTS}
|
|
||||||
${P25HOSTS}
|
|
||||||
${M17HOSTS}
|
|
||||||
${YSFHOSTS}
|
|
||||||
${FCSHOSTS}
|
|
||||||
${XLXHOSTS}
|
|
||||||
${NXDNIDFILE}
|
|
||||||
${NXDNHOSTS}
|
|
||||||
${TGLISTBM}
|
|
||||||
${TGLISTDNR}
|
|
||||||
${TGLISTP25}
|
|
||||||
${TGLISTNXDN}
|
|
||||||
${TGLISTYSF}"
|
|
||||||
|
|
||||||
for file in ${FILES}
|
if backup_count > FILEBACKUP:
|
||||||
do
|
for backup_file in sorted(os.listdir(), key=lambda f: os.path.getctime(f)):
|
||||||
BACKUPCOUNT=$(ls ${file}.* | wc -l)
|
if backup_file.startswith(f"{file}.") and backups_to_delete > 0:
|
||||||
BACKUPSTODELETE=$(expr ${BACKUPCOUNT} - ${FILEBACKUP})
|
os.remove(backup_file)
|
||||||
if [ ${BACKUPCOUNT} -gt ${FILEBACKUP} ]; then
|
backups_to_delete -= 1
|
||||||
for f in $(ls -tr ${file}.* | head -${BACKUPSTODELETE})
|
|
||||||
do
|
|
||||||
rm $f
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Generate Host Files
|
# Generate Host Files
|
||||||
curl --fail -o ${APRSHOSTS} -s http://www.pistar.uk/downloads/APRS_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
files_to_generate = [
|
||||||
curl --fail -o ${DCSHOSTS} -s http://www.pistar.uk/downloads/DCS_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
(APRSHOSTS, "http://www.pistar.uk/downloads/APRS_Hosts.txt"),
|
||||||
curl --fail -o ${DMRHOSTS} -s http://www.pistar.uk/downloads/DMR_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
(DCSHOSTS, "http://www.pistar.uk/downloads/DCS_Hosts.txt"),
|
||||||
if [ -f /etc/hostfiles.nodextra ]; then
|
(DMRHOSTS, "http://www.pistar.uk/downloads/DMR_Hosts.txt"),
|
||||||
# Move XRFs to DPlus Protocol
|
(DPlusHOSTS, "http://www.pistar.uk/downloads/DPlus_Hosts.txt"),
|
||||||
curl --fail -o ${DPlusHOSTS} -s http://www.pistar.uk/downloads/DPlus_WithXRF_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
(DExtraHOSTS, "http://www.pistar.uk/downloads/DExtra_Hosts.txt"),
|
||||||
curl --fail -o ${DExtraHOSTS} -s http://www.pistar.uk/downloads/DExtra_NoXRF_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
(DMRIDFILE, "http://www.pistar.uk/downloads/DMRIds.dat"),
|
||||||
else
|
(P25HOSTS, "http://www.pistar.uk/downloads/P25_Hosts.txt"),
|
||||||
# Normal Operation
|
(M17HOSTS, "http://www.pistar.uk/downloads/M17_Hosts.txt"),
|
||||||
curl --fail -o ${DPlusHOSTS} -s http://www.pistar.uk/downloads/DPlus_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
(YSFHOSTS, "http://www.pistar.uk/downloads/YSF_Hosts.txt"),
|
||||||
curl --fail -o ${DExtraHOSTS} -s http://www.pistar.uk/downloads/DExtra_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
(FCSHOSTS, "http://www.pistar.uk/downloads/FCS_Hosts.txt"),
|
||||||
fi
|
(XLXHOSTS, "http://www.pistar.uk/downloads/XLXHosts.txt"),
|
||||||
curl --fail -o ${DMRIDFILE} -s http://www.pistar.uk/downloads/DMRIds.dat --user-agent "Pi-Star_${pistarCurVersion}"
|
(NXDNIDFILE, "http://www.pistar.uk/downloads/NXDN.csv"),
|
||||||
curl --fail -o ${P25HOSTS} -s http://www.pistar.uk/downloads/P25_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
(NXDNHOSTS, "http://www.pistar.uk/downloads/NXDN_Hosts.txt"),
|
||||||
curl --fail -o ${M17HOSTS} -s http://www.pistar.uk/downloads/M17_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
(TGLISTBM, "http://www.pistar.uk/downloads/TGList_BM.txt"),
|
||||||
curl --fail -o ${YSFHOSTS} -s http://www.pistar.uk/downloads/YSF_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
(TGLISTDMR, "http://www.pistar.uk/downloads/TGList_BM.txt"),
|
||||||
curl --fail -o ${FCSHOSTS} -s http://www.pistar.uk/downloads/FCS_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
(TGLISTP25, "http://www.pistar.uk/downloads/TGList_P25.txt"),
|
||||||
#curl --fail -s http://www.pistar.uk/downloads/USTrust_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}" >> ${DExtraHOSTS}
|
(TGLISTNXDN, "http://www.pistar.uk/downloads/TGList_NXDN.txt"),
|
||||||
curl --fail -o ${XLXHOSTS} -s http://www.pistar.uk/downloads/XLXHosts.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
(TGLISTYSF, "http://www.pistar.uk/downloads/TGList_YSF.txt")
|
||||||
curl --fail -o ${NXDNIDFILE} -s http://www.pistar.uk/downloads/NXDN.csv --user-agent "Pi-Star_${pistarCurVersion}"
|
]
|
||||||
curl --fail -o ${NXDNHOSTS} -s http://www.pistar.uk/downloads/NXDN_Hosts.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
|
||||||
curl --fail -o ${TGLISTBM} -s http://www.pistar.uk/downloads/TGList_BM.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
|
||||||
curl --fail -o ${TGLISTDMR} -s http://www.pistar.uk/downloads/TGList_BM.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
|
||||||
curl --fail -o ${TGLISTP25} -s http://www.pistar.uk/downloads/TGList_P25.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
|
||||||
curl --fail -o ${TGLISTNXDN} -s http://www.pistar.uk/downloads/TGList_NXDN.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
|
||||||
curl --fail -o ${TGLISTYSF} -s http://www.pistar.uk/downloads/TGList_YSF.txt --user-agent "Pi-Star_${pistarCurVersion}"
|
|
||||||
|
|
||||||
# If there is a DMR Over-ride file, add it's contents to DMR_Hosts.txt
|
for dest_file, source_url in files_to_generate:
|
||||||
if [ -f "/root/DMR_Hosts.txt" ]; then
|
subprocess.run(['curl', '--fail', '-o', dest_file, '-s', source_url])
|
||||||
cat /root/DMR_Hosts.txt >> ${DMRHOSTS}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add custom YSF Hosts
|
|
||||||
if [ -f "/root/YSFHosts.txt" ]; then
|
|
||||||
cat /root/YSFHosts.txt >> ${YSFHOSTS}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fix DMRGateway issues with brackets
|
|
||||||
if [ -f "/etc/dmrgateway" ]; then
|
|
||||||
sed -i '/Name=.*(/d' /etc/dmrgateway
|
|
||||||
sed -i '/Name=.*)/d' /etc/dmrgateway
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add some fixes for P25Gateway
|
|
||||||
|
|
||||||
if [ -f "/root/P25Hosts.txt" ]; then
|
|
||||||
cat /root/P25Hosts.txt > /opt/data-files/P25HostsLocal.txt
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add local over-ride for M17Hosts
|
|
||||||
if [ -f "/root/M17Hosts.txt" ]; then
|
|
||||||
cat /root/M17Hosts.txt >> ${M17HOSTS}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fix up new NXDNGateway Config Hostfile setup
|
|
||||||
|
|
||||||
if [ ! -f "/root/NXDNHosts.txt" ]; then
|
|
||||||
touch /root/NXDNHosts.txt
|
|
||||||
fi
|
|
||||||
if [ ! -f "/opt/data-files/NXDNHostsLocal.txt" ]; then
|
|
||||||
touch /opt/data-files/NXDNHostsLocal.txt
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add custom NXDN Hosts
|
|
||||||
if [ -f "/root/NXDNHosts.txt" ]; then
|
|
||||||
cat /root/NXDNHosts.txt > /opt/data-files/NXDNHostsLocal.txt
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If there is an XLX over-ride
|
|
||||||
if [ -f "/root/XLXHosts.txt" ]; then
|
|
||||||
while IFS= read -r line; do
|
|
||||||
if [[ $line != \#* ]] && [[ $line = *";"* ]]
|
|
||||||
then
|
|
||||||
xlxid=`echo $line | awk -F ";" '{print $1}'`
|
|
||||||
xlxip=`echo $line | awk -F ";" '{print $2}'`
|
|
||||||
#xlxip=`grep "^${xlxid}" /opt/data-files/XLXHosts.txt | awk -F ";" '{print $2}'`
|
|
||||||
xlxroom=`echo $line | awk -F ";" '{print $3}'`
|
|
||||||
xlxNewLine="${xlxid};${xlxip};${xlxroom}"
|
|
||||||
/bin/sed -i "/^$xlxid\;/c\\$xlxNewLine" /opt/data-files/XLXHosts.txt
|
|
||||||
fi
|
|
||||||
done < /root/XLXHosts.txt
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Yaesu FT-70D radios only do upper case
|
|
||||||
if [ -f "/etc/hostfiles.ysfupper" ]; then
|
|
||||||
sed -i 's/\(.*\)/\U\1/' ${YSFHOSTS}
|
|
||||||
sed -i 's/\(.*\)/\U\1/' ${FCSHOSTS}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fix up ircDDBGateway Host Files on v4
|
# Fix up ircDDBGateway Host Files on v4
|
||||||
if [ -d "/opt/data-files/ircddbgateway" ]; then
|
if os.path.exists("/opt/data-files/ircddbgateway"):
|
||||||
if [[ -f "/opt/data-files/ircddbgateway/DCS_Hosts.txt" && ! -L "/opt/data-files/ircddbgateway/DCS_Hosts.txt" ]]; then
|
ircddbgateway_files = [
|
||||||
rm -rf /opt/data-files/ircddbgateway/DCS_Hosts.txt
|
("DCS_Hosts.txt", DCSHOSTS),
|
||||||
ln -s /opt/data-files/DCS_Hosts.txt /opt/data-files/ircddbgateway/DCS_Hosts.txt
|
("DExtra_Hosts.txt", DExtraHOSTS),
|
||||||
fi
|
("DPlus_Hosts.txt", DPlusHOSTS),
|
||||||
if [[ -f "/opt/data-files/ircddbgateway/DExtra_Hosts.txt" && ! -L "/opt/data-files/ircddbgateway/DExtra_Hosts.txt" ]]; then
|
("CCS_Hosts.txt", "/opt/data-files/CCS_Hosts.txt"),
|
||||||
rm -rf /opt/data-files/ircddbgateway/DExtra_Hosts.txt
|
]
|
||||||
ln -s /opt/data-files/DExtra_Hosts.txt /opt/data-files/ircddbgateway/DExtra_Hosts.txt
|
|
||||||
fi
|
|
||||||
if [[ -f "/opt/data-files/ircddbgateway/DPlus_Hosts.txt" && ! -L "/opt/data-files/ircddbgateway/DPlus_Hosts.txt" ]]; then
|
|
||||||
rm -rf /opt/data-files/ircddbgateway/DPlus_Hosts.txt
|
|
||||||
ln -s /opt/data-files/DPlus_Hosts.txt /opt/data-files/ircddbgateway/DPlus_Hosts.txt
|
|
||||||
fi
|
|
||||||
if [[ -f "/opt/data-files/ircddbgateway/CCS_Hosts.txt" && ! -L "/opt/data-files/ircddbgateway/CCS_Hosts.txt" ]]; then
|
|
||||||
rm -rf /opt/data-files/ircddbgateway/CCS_Hosts.txt
|
|
||||||
ln -s /opt/data-files/CCS_Hosts.txt /opt/data-files/ircddbgateway/CCS_Hosts.txt
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit 0
|
for ircddbgateway_file, symlink_target in ircddbgateway_files:
|
||||||
|
ircddbgateway_path = f"/opt/data-files/ircddbgateway/{ircddbgateway_file}"
|
||||||
|
if os.path.exists(ircddbgateway_path) and not os.path.islink(ircddbgateway_path):
|
||||||
|
os.remove(ircddbgateway_path)
|
||||||
|
os.symlink(symlink_target, ircddbgateway_path)
|
||||||
|
|
||||||
|
exit(0)
|
||||||
|
|
||||||
EOFXC
|
EOFXC
|
||||||
###
|
###
|
||||||
chmod +x /opt/data-file.sh
|
|
||||||
mkdir /opt/data-files
|
mkdir /opt/data-files
|
||||||
chmod 777 /opt/data-files
|
chmod 777 /opt/data-files
|
||||||
sh /opt/data-file.sh
|
python3 /opt/data-mmdvm.py
|
||||||
|
|
||||||
###############################################################################################################################
|
###############################################################################################################################
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ sudo nano /opt/YSFGateway2/YSFGateway.ini;;
|
||||||
4)
|
4)
|
||||||
sudo nano /opt/YSF2DMRGW/YSF2DMR.ini;;
|
sudo nano /opt/YSF2DMRGW/YSF2DMR.ini;;
|
||||||
5)
|
5)
|
||||||
sh /opt/data-file.sh && cronedit.sh '* */24 * * *' 'sh /opt/data-file.sh' add
|
python3 /opt/data-mmdvm.py && cronedit.sh '* */24 * * *' 'python3 /opt/data-mmdvm.py' add
|
||||||
sudo systemctl stop mmdvmh.service
|
sudo systemctl stop mmdvmh.service
|
||||||
if cat /opt/MMDVMHost/MMDVM.ini | grep ServiceStart=0 >/dev/null 2>&1
|
if cat /opt/MMDVMHost/MMDVM.ini | grep ServiceStart=0 >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
|
|
@ -92,7 +92,7 @@ fi
|
||||||
6)
|
6)
|
||||||
if systemctl status ysf2dmr.service | grep disable >/dev/null 2>&1
|
if systemctl status ysf2dmr.service | grep disable >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
cronedit.sh '* */24 * * *' 'sh /opt/data-file.sh' remove
|
cronedit.sh '* */24 * * *' 'python3 /opt/data-mmdvm.py' remove
|
||||||
fi
|
fi
|
||||||
sudo systemctl stop mmdvmh.service && sudo systemctl disable mmdvmh.service && systemctl stop ysf2dmrgw.service && sudo systemctl stop dmrgw.service ;;
|
sudo systemctl stop mmdvmh.service && sudo systemctl disable mmdvmh.service && systemctl stop ysf2dmrgw.service && sudo systemctl stop dmrgw.service ;;
|
||||||
7)
|
7)
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ case $choix in
|
||||||
1)
|
1)
|
||||||
sudo nano /opt/NXDN2DMR/NXDN2DMR.ini;;
|
sudo nano /opt/NXDN2DMR/NXDN2DMR.ini;;
|
||||||
2)
|
2)
|
||||||
sh /opt/data-file.sh && (crontab -l; echo "* */24 * * * sh /opt/data-file.sh")|awk '!x[$0]++'|crontab - &&
|
python3 /opt/data-mmdvm.py && (crontab -l; echo "* */24 * * * python3 /opt/data-mmdvm.py")|awk '!x[$0]++'|crontab - &&
|
||||||
if systemctl status nxdn2dmr.service |grep active >/dev/null 2>&1
|
if systemctl status nxdn2dmr.service |grep active >/dev/null 2>&1
|
||||||
then sudo systemctl stop nxdn2dmr.service
|
then sudo systemctl stop nxdn2dmr.service
|
||||||
|
|
||||||
|
|
@ -33,7 +33,7 @@ sudo systemctl start nxdn2dmr.service ;;
|
||||||
3)
|
3)
|
||||||
if systemctl status mmdvmh.service | grep disable >/dev/null 2>&1
|
if systemctl status mmdvmh.service | grep disable >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
(crontab -l | grep -v "sh /opt/data-file.sh") | crontab -
|
(crontab -l | grep -v "python3 /opt/data-mmdvm.py") | crontab -
|
||||||
fi
|
fi
|
||||||
sudo systemctl stop nxdn2dmr.service && sudo systemctl disable nxdn2dmr.service ;;
|
sudo systemctl stop nxdn2dmr.service && sudo systemctl disable nxdn2dmr.service ;;
|
||||||
4)
|
4)
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ case $choix in
|
||||||
1)
|
1)
|
||||||
sudo nano /opt/YSF2DMR/YSF2DMR.ini;;
|
sudo nano /opt/YSF2DMR/YSF2DMR.ini;;
|
||||||
2)
|
2)
|
||||||
sh /opt/data-file.sh && (crontab -l; echo "* */24 * * * sh /opt/data-file.sh")|awk '!x[$0]++'|crontab - &&
|
python3 /opt/data-mmdvm.py && (crontab -l; echo "* */24 * * * python3 /opt/data-mmdvm.py")|awk '!x[$0]++'|crontab - &&
|
||||||
if systemctl status ysf2dmr.service |grep active >/dev/null 2>&1
|
if systemctl status ysf2dmr.service |grep active >/dev/null 2>&1
|
||||||
then sudo systemctl stop ysf2dmr.service
|
then sudo systemctl stop ysf2dmr.service
|
||||||
|
|
||||||
|
|
@ -33,7 +33,7 @@ sudo systemctl start ysf2dmr.service ;;
|
||||||
3)
|
3)
|
||||||
if systemctl status mmdvmh.service | grep disable >/dev/null 2>&1
|
if systemctl status mmdvmh.service | grep disable >/dev/null 2>&1
|
||||||
then
|
then
|
||||||
(crontab -l | grep -v "sh /opt/data-file.sh") | crontab -
|
(crontab -l | grep -v "python3 /opt/data-mmdvm.py") | crontab -
|
||||||
fi
|
fi
|
||||||
sudo systemctl stop ysf2dmr.service && sudo systemctl disable ysf2dmr.service ;;
|
sudo systemctl stop ysf2dmr.service && sudo systemctl disable ysf2dmr.service ;;
|
||||||
4)
|
4)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue