merge-requests/1/head
Esteban Mackay Q. 2 years ago
parent 5f7534e134
commit bc0bfa4513

@ -2,13 +2,14 @@
<img src="https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-Docker/main/Easy-FreeDMR-Docker.png" width="550" height="450"><img src="https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/main/screenshot.png" width="550" height="450"> <img src="https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-Docker/main/Easy-FreeDMR-Docker.png" width="550" height="450"><img src="https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/main/screenshot.png" width="550" height="450">
Is an excerpt from the emq-TE1ws proyect, focused on new and current sysops who want to install FreeDMR easily, quickly and up-to-date. ADN Systems DMR Peer Server is a fork from FreeDMR by G7RZU hacknix
Launched on April 21, 2024, by a visionary group of 20 international amateur radio enthusiasts, ADN Systems operates on an Open Bridge Protocol (OBP), fostering a decentralized network devoid of hierarchical structures.
This shell, install FreeDMR Peer Server,with 2 option Dashboard for select: FDMR-Monitor by OA4DOA Christian and FDMR-Monitor by CS8ABG Bruno , Both Dashboard version Self-Service This shell, install ADN Peer Server,with 2 option Dashboard for select: FDMR-Monitor by OA4DOA Christian and FDMR-Monitor by CS8ABG Bruno , Both Dashboard version Self-Service
# #
Shell easy auto install FreeDMR Peer Server version Self-Service without Docker, latest original gitlab hacknix version by G7RZU Simon, with Dashboard, template mods by WP3JM James & N6DOZ Rudy, Self-Service mods with Dial-TG by IU2NAF Diego and menu by HP3ICC. Shell easy auto install ADN Peer Server version Self-Service without Docker latest release, with Dashboard, template mods by WP3JM James & N6DOZ Rudy, Self-Service mods with Dial-TG by IU2NAF Diego and menu by HP3ICC.
# Compatibility # Compatibility
@ -20,8 +21,7 @@ Shell easy auto install FreeDMR Peer Server version Self-Service without Docker,
<img src="https://adn.systems/wp-content/uploads/2024/04/logo1.png" width="250" height="150"> <img src="https://adn.systems/wp-content/uploads/2024/04/logo1.png" width="250" height="150">
* Very important, this script is preconfigured to be used in the ADN Systems server mesh, if you want to use it in other networks, it must meet the configuration requirements of the network that you want to connect your server with the FreeDMR-peer-server software. * Very important, this script is preconfigured to be used in the ADN Systems server mesh
# Pre-Requirements # Pre-Requirements
@ -50,7 +50,7 @@ into your ssh terminal copy and paste the following link :
At the end of the installation your freedmr Peer server will be installed and working, a menu will be displayed that will make it easier for you to edit, restart or update your server and dashboard to future versions. At the end of the installation your freedmr Peer server will be installed and working, a menu will be displayed that will make it easier for you to edit, restart or update your server and dashboard to future versions.
to use the options menu, just type "menu-fdmr" without the quotes in your ssh terminal or console. to use the options menu, just type "menu-adn" without the quotes in your ssh terminal or console.
# #
@ -60,7 +60,7 @@ into your ssh terminal copy and paste the following link :
The self-service feature, added by fellow OA4DOA Christian, allows each user to add or remove one or more static tgs from the ease of a graphical environment from the server's Dashboard. The self-service feature, added by fellow OA4DOA Christian, allows each user to add or remove one or more static tgs from the ease of a graphical environment from the server's Dashboard.
Thanks to colleague IU2NAF Diego and the FreeDMR Italia team, they add Dial-TG compatibility and option to customize the language of the announcement voice or use CW. Thanks to colleague IU2NAF Diego and the Italia team, they compatibility and option to customize the language of the announcement voice or use CW.
# Self-Service database # Self-Service database
@ -95,7 +95,7 @@ To facilitate your update, copy all your obp in the opb list menu option, when w
<img src="https://gitlab.com/hp3icc/fdmr/-/raw/main/img/IMG_5900.jpg" width="250" height="280"> <img src="https://gitlab.com/hp3icc/fdmr/-/raw/main/img/IMG_5900.jpg" width="250" height="280">
* Select update FreeDMR * Select update ADN Server
<img src="https://gitlab.com/hp3icc/fdmr/-/raw/main/img/IMG_5899.jpg" width="250" height="280"> <img src="https://gitlab.com/hp3icc/fdmr/-/raw/main/img/IMG_5899.jpg" width="250" height="280">
@ -111,19 +111,15 @@ To facilitate your update, copy all your obp in the opb list menu option, when w
# #
# FreeDMR Peer Server Release :
* v1.3.19
# Location files config : # Location files config :
* FreeDMR Peer Server: * ADN DMR Peer Server:
/opt/FreeDMR/config/FreeDMR.cfg /opt/ADN-DMR-Peer-Server/config/FreeDMR.cfg
* FreeDMR Rules: * FreeDMR Rules:
/opt/FreeDMR/config/FreeDMR.cfg /opt/ADN-DMR-Peer-Server/config/FreeDMR.cfg
* FDMR-Monitor: * FDMR-Monitor:
@ -137,17 +133,17 @@ To facilitate your update, copy all your obp in the opb list menu option, when w
# Systemctl Services : # Systemctl Services :
* Freedmr: * ADN DMR server:
freedmr.service adn-server.service
* FreeDMR Proxy: * ADN server Proxy:
proxy.service proxy.service
* FreeDMR Parrot: * ADN server Parrot:
fdmrparrot.service adn-parrot.service
* FDMR-Monitor: * FDMR-Monitor:
@ -180,14 +176,11 @@ To facilitate your update, copy all your obp in the opb list menu option, when w
# #
* Support * Support
<p><a title="ADN Systems - User Group" href="https://t.me/ADN_Systems" target="_blank"><img src="https://gitlab.com/uploads/-/system/project/avatar/15566648/telegram_icon.png" alt="" width="28" height="28" /></a></p>
Unofficial script to install Freedmr Peer Server with Dashboard self-service, if you require support from the official version of the developer , refer to the original developer script : Contact us in our Telegram group, and join a truly free network for amateur radio use, based on 3 pillars, equality, respect and responsibility.
<img src="https://gitlab.com/hp3icc/Easy-FreeDMR-Docker/-/raw/main/img/Free_DMR_logo_600x338.png" width="150" height="75">
https://gitlab.hacknix.net/hacknix/FreeDMR/-/wikis/Installing-using-Docker-(recommended!) If you have the basic knowledge of Linux to install, configure and manage a DMR server, you can integrate your server to the ever-growing network of mesh servers of Amateur radio digital network systems.
FreeDMR Peer Server original version gitlab FreeDMR by G7RZU hacknix Simon.
# #
@ -200,9 +193,9 @@ Special thanks to colleagues: CE5RPY Rodrigo, CS8ABG Bruno, OA4DOA Christian, G7
# Sources : # Sources :
* https://gitlab.hacknix.net/hacknix/FreeDMR * https://github.com/Amateur-Digital-Network/ADN-DMR-Peer-Server
* http://www.freedmr.uk/index.php/freedmr-server-install/ * https://gitlab.hacknix.net/hacknix/FreeDMR
* https://github.com/CS8ABG/FDMR-Monitor/tree/Self_Service * https://github.com/CS8ABG/FDMR-Monitor/tree/Self_Service

@ -56,9 +56,9 @@ else
echo "file not found" echo "file not found"
fi fi
if [ -f "/opt/FreeDMR/config/FreeDMR.cfg" ]; if [ -f "/opt/ADN-DMR-Peer-Server/config/adn.cfg" ];
then then
variable=$(grep "SERVER_ID:" /opt/FreeDMR/config/FreeDMR.cfg | grep -Eo '[0-9]{1,9}') variable=$(grep "SERVER_ID:" /opt/ADN-DMR-Peer-Server/config/adn.cfg | grep -Eo '[0-9]{1,9}')
else else
echo "id not found" echo "id not found"
@ -69,13 +69,13 @@ then variable=0000
fi fi
################################### ###################################
if [ -d "/var/log/FreeDMR" ] if [ -d "/var/log/ADN" ]
then then
sudo rm -rf /var/log/FreeDMR sudo rm -rf /var/log/ADN
fi fi
if [ -d "/opt/FreeDMR" ] if [ -d "/opt/ADN-DMR-Peer-Server" ]
then then
sudo rm -rf /opt/FreeDMR sudo rm -rf /opt/ADN-DMR-Peer-Server
fi fi
if [ -d "/var/www/fdmr2" ] if [ -d "/var/www/fdmr2" ]
then then
@ -115,9 +115,9 @@ if [ ! -d "/var/www/fdmr2" ]
then then
mkdir -p /var/www/fdmr2 mkdir -p /var/www/fdmr2
fi fi
if [ ! -d "/var/log/FreeDMR" ] if [ ! -d "/var/log/ADN" ]
then then
mkdir -p /var/log/FreeDMR mkdir -p /var/log/ADN
fi fi
######################## ########################
if [ -f "/opt/obp.txt" ] if [ -f "/opt/obp.txt" ]
@ -221,160 +221,38 @@ echo "${commands}" | /usr/bin/mysql -u root
#sudo -H pip3 install --upgrade pip #sudo -H pip3 install --upgrade pip
#pip install pyopenssl --upgrade #pip install pyopenssl --upgrade
cd /opt cd /opt
git clone https://gitlab.hacknix.net/hacknix/FreeDMR.git git clone https://github.com/Amateur-Digital-Network/ADN-DMR-Peer-Server.git
cd FreeDMR cd ADN-DMR-Peer-Server
sudo git checkout v1.3.19 sudo git checkout develop
mkdir config mkdir config
mkdir /var/log/FreeDMR mkdir /var/log/ADN
sudo chmod +x /opt/FreeDMR/* sudo chmod -R +x /opt/ADN-DMR-Peer-Server/*
#./install.sh #./install.sh
cp /opt/ADN-DMR-Peer-Server/config/ADN-SAMPLE.cfg /opt/ADN-DMR-Peer-Server/config/adn.cfg
sudo cat > /opt/conf.txt <<- "EOF" sed -i "s/SERVER_ID:.*/SERVER_ID: $variable/g" /opt/ADN-DMR-Peer-Server/config/adn.cfg
[D-APRS]
MODE: MASTER
ENABLED: True
REPEAT: False
MAX_PEERS: 1
EXPORT_AMBE: False
IP:
PORT: 52555
PASSPHRASE:
GROUP_HANGTIME: 0
USE_ACL: True
REG_ACL: DENY:1
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL
DEFAULT_UA_TIMER: 10
SINGLE_MODE: False
VOICE_IDENT: False
TS1_STATIC:
TS2_STATIC:
DEFAULT_REFLECTOR: 0
ANNOUNCEMENT_LANGUAGE: es_ES
GENERATOR: 2
ALLOW_UNREG_ID: True
PROXY_CONTROL: False
OVERRIDE_IDENT_TG:
[ECHO]
MODE: PEER
ENABLED: True
LOOSE: True
EXPORT_AMBE: False
IP:
#127.0.0.1
PORT: 49060
MASTER_IP: 127.0.0.1
MASTER_PORT: 49061
PASSPHRASE: passw0rd
CALLSIGN: ECHOTEST
RADIO_ID: 9990
RX_FREQ: 449000000
TX_FREQ: 444000000
TX_POWER: 25
COLORCODE: 1
SLOTS: 3
LATITUDE: 38.0000
LONGITUDE: -095.0000
HEIGHT: 75
LOCATION: Local Parrot
DESCRIPTION: This is a cool repeater
URL: www.w1abc.org
SOFTWARE_ID: 20170620
PACKAGE_ID: MMDVM_HBlink
GROUP_HANGTIME: 3
OPTIONS:
#TS2=9990;DIAL=0;VOICE=0;TIMER=0
USE_ACL: True
SUB_ACL: DENY:1
TGID_TS1_ACL: DENY:ALL
TGID_TS2_ACL: PERMIT:9990
TS1_STATIC:
TS2_STATIC:9990
DEFAULT_REFLECTOR: 0
ANNOUNCEMENT_LANGUAGE: en_GB
GENERATOR: 0
DEFAULT_UA_TIMER: 999
SINGLE_MODE: True
VOICE_IDENT: False
EOF
##
if [ "$(cat /opt/FreeDMR/FreeDMR-SAMPLE.cfg | grep 'KEYS_FILE')" != "" ]; then
sudo sed -i 's/KEYS_FILE:.*/KEYS_FILE: keys.json/' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
else
sudo sed '45 a KEYS_FILE: keys.json' -i /opt/FreeDMR/FreeDMR-SAMPLE.cfg
fi
sed -i '/\[OBP-TEST\]/,/\[/{s/TGID_ACL: [^ ]*/TGID_ACL: DENY:0-82,92-199,800-899,9990-9999,900999/}' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|ANNOUNCEMENT_LANGUAGE:.*|ANNOUNCEMENT_LANGUAGE: es_ES|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|54000|56400|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|PROTO_VER:.*|PROTO_VER: 5|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
#sed -i "s|VALIDATE_SERVER_IDS:.*|VALIDATE_SERVER_IDS: False|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|PROXY_CONTROL:.*|PROXY_CONTROL: False|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
#
sed -i "s|SINGLE_MODE:.*|SINGLE_MODE: False|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|VOICE_IDENT:.*|VOICE_IDENT: False|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|PEER_FILE:.*|PEER_FILE: peer_ids.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|SUBSCRIBER_FILE:.*|SUBSCRIBER_FILE: subscriber_ids.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|TGID_FILE:.*|TGID_FILE: talkgroup_ids.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|PEER_URL:.*|PEER_URL: https://adn.systems/files/peer_ids.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|SUBSCRIBER_URL:.*|SUBSCRIBER_URL: https://adn.systems/files/subscriber_ids.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|TGID_URL:.*|TGID_URL: https://adn.systems/files/talkgroup_ids.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|STALE_TIME:.*|STALE_TIME: 1|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|SUB_MAP_FILE:.*|SUB_MAP_FILE: sub_map.pkl|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|SERVER_ID_FILE:.*|SERVER_ID_FILE: server_ids.tsv|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|CHECKSUM_URL:.*|CHECKSUM_URL: https://adn.systems/files/file_checksums.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|CHECKSUM_FILE:.*|CHECKSUM_FILE: file_checksums.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|SERVER_ID_URL:.*|SERVER_ID_URL: https://adn.systems/files/server_ids.tsv|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
# #
wget https://adn.systems/files/cwadnsystems.ambe -O /opt/FreeDMR/Audio/CW/freedmr.ambe cd /opt/ADN-DMR-Peer-Server/
wget https://adn.systems/files/adn.ambe -O /opt/FreeDMR/Audio/es_ES/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/en_GB/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/en_GB_2/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/fr_FR/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/pt_PT/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/th_TH/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/de_DE/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/cy_GB/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/el_GR/freedmr.ambe
cp /opt/FreeDMR/FreeDMR-SAMPLE.cfg /opt/FreeDMR-SAMPLE.cfg
cd /opt/
cat FreeDMR-SAMPLE.cfg conf.txt obp.txt >> /opt/FreeDMR/config/FreeDMR.cfg
sed -i 's/file-timed/console-timed/' /opt/FreeDMR/config/FreeDMR.cfg
sed -i 's/INFO/DEBUG/' /opt/FreeDMR/config/FreeDMR.cfg
sed -i 's/freedmr.log/\/var\/log\/FreeDMR\/FreeDMR.log/' /opt/FreeDMR/config/FreeDMR.cfg
sed -i "s/SERVER_ID:.*/SERVER_ID: $variable/g" /opt/FreeDMR/config/FreeDMR.cfg
#
rm /opt/conf.txt
rm /opt/FreeDMR-SAMPLE.cfg
#
cd /opt/FreeDMR/
mv loro.cfg /opt/FreeDMR/playback.cfg
sed -i 's/54915/49061/' /opt/FreeDMR/playback.cfg
sudo chmod +x /opt/FreeDMR/config/*
############# #############
wget https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/Self_Service/proxy/hotspot_proxy_v2.py -O /opt/FreeDMR/hotspot_proxy_v2.py wget https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/Self_Service/proxy/hotspot_proxy_v2.py -O /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
wget https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/Self_Service/proxy/proxy_SAMPLE.cfg -O /opt/FreeDMR/proxy.cfg wget https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/Self_Service/proxy/proxy_SAMPLE.cfg -O /opt/ADN-DMR-Peer-Server/proxy.cfg
wget https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/Self_Service/proxy/proxy_db.py -O /opt/FreeDMR/proxy_db.py wget https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/Self_Service/proxy/proxy_db.py -O /opt/ADN-DMR-Peer-Server/proxy_db.py
#################### ####################
sed -i "s/db_username =.*/db_username = 'hbmon'/g" /opt/FreeDMR/hotspot_proxy_v2.py sed -i "s/db_username =.*/db_username = 'hbmon'/g" /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
sed -i "s/db_password =.*/db_password = 'hbmon'/g" /opt/FreeDMR/hotspot_proxy_v2.py sed -i "s/db_password =.*/db_password = 'hbmon'/g" /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
sed -i "s/db_name =.*/db_name = 'hbmon'/g" /opt/FreeDMR/hotspot_proxy_v2.py sed -i "s/db_name =.*/db_name = 'hbmon'/g" /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
sed -i "s/\/freedmr.cfg/\/config\/FreeDMR.cfg/g" /opt/FreeDMR/hotspot_proxy_v2.py sed -i "s/\/freedmr.cfg/\/config\/adn.cfg/g" /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
sed -i "s/db_selfcare =.*/db_selfcare = ProxyDB('localhost', 'hbmon', 'hbmon', 'hbmon', 3306)/g" /opt/FreeDMR/proxy_db.py sed -i "s/db_selfcare =.*/db_selfcare = ProxyDB('localhost', 'hbmon', 'hbmon', 'hbmon', 3306)/g" /opt/ADN-DMR-Peer-Server/proxy_db.py
sed -i "s/USERNAME =.*/USERNAME = hbmon/g" /opt/FreeDMR/proxy.cfg sed -i "s/USERNAME =.*/USERNAME = hbmon/g" /opt/ADN-DMR-Peer-Server/proxy.cfg
sed -i "s/PASSWORD =.*/PASSWORD = hbmon/g" /opt/FreeDMR/proxy.cfg sed -i "s/PASSWORD =.*/PASSWORD = hbmon/g" /opt/ADN-DMR-Peer-Server/proxy.cfg
sed -i "s/DB_NAME =.*/DB_NAME = hbmon/g" /opt/FreeDMR/proxy.cfg sed -i "s/DB_NAME =.*/DB_NAME = hbmon/g" /opt/ADN-DMR-Peer-Server/proxy.cfg
sed -i "s/54000/56400/g" /opt/FreeDMR/proxy_db.py sed -i "s/54000/56400/g" /opt/ADN-DMR-Peer-Server/proxy_db.py
sed -i "s/54000/56400/g" /opt/FreeDMR/proxy.cfg sed -i "s/54000/56400/g" /opt/ADN-DMR-Peer-Server/proxy.cfg
sed -i "s/54100/56499/g" /opt/FreeDMR/proxy_db.py sed -i "s/54100/56499/g" /opt/ADN-DMR-Peer-Server/proxy_db.py
sed -i "s/54100/56499/g" /opt/FreeDMR/proxy.cfg sed -i "s/54100/56499/g" /opt/ADN-DMR-Peer-Server/proxy.cfg
sed -i "s/54000/56400/g" /opt/FreeDMR/hotspot_proxy_v2.py sed -i "s/54000/56400/g" /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
sed -i "s/54100/56499/g" /opt/FreeDMR/hotspot_proxy_v2.py sed -i "s/54100/56499/g" /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
sed -i "s/1234567/1234567,1231237,123123701/g" /opt/FreeDMR/proxy.cfg sed -i "s/1234567/1234567,1231237,123123701/g" /opt/ADN-DMR-Peer-Server/proxy.cfg
#sed -i '228s/20/50/' /opt/FreeDMR/hotspot_proxy_v2.py #sed -i '228s/20/50/' /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
####################### #######################
#FDMR-Monitor #FDMR-Monitor
cd /opt cd /opt
@ -387,31 +265,15 @@ sudo git checkout Self_Service
sudo chmod +x install.sh sudo chmod +x install.sh
chmod 755 /opt/FDMR-Monitor/data chmod 755 /opt/FDMR-Monitor/data
# #
sed -i 's/RELOAD_TIME =.*/RELOAD_TIME = 1/' /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sed -i 's/FREQUENCY =.*/FREQUENCY = 1/' /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sudo chmod 644 /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg sudo chmod 644 /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sed '33 a <!--' -i /opt/FDMR-Monitor/html/sysinfo.php
sed '35 a -->' -i /opt/FDMR-Monitor/html/sysinfo.php
#### ####
sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/html/*.* sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/html/*.*
sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/sysinfo/*.* sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/sysinfo/*.*
sed -i "s/1100/1200/g" /opt/FDMR-Monitor/html/*.*
sed -i "s/1100/1200/g" /opt/FDMR-Monitor/html/css/*.*
sed -i "s/1100/1200/g" /opt/FDMR-Monitor/templates/*.*
sed -i 's/b1eee9/3bb43d/' /opt/FDMR-Monitor/html/css/*.*
#### ####
sed -i 's/localhost_2-day.png/localhost_1-day.png/' /opt/FDMR-Monitor/html/sysinfo.php
sed -i "s/HBMonv2/FDMR-Monitor/g" /opt/FDMR-Monitor/sysinfo/*.sh
sudo chmod +x /opt/FDMR-Monitor/sysinfo/cpu.sh sudo chmod +x /opt/FDMR-Monitor/sysinfo/cpu.sh
sudo chmod +x /opt/FDMR-Monitor/sysinfo/graph.sh sudo chmod +x /opt/FDMR-Monitor/sysinfo/graph.sh
sudo chmod +x /opt/FDMR-Monitor/sysinfo/rrd-db.sh sudo chmod +x /opt/FDMR-Monitor/sysinfo/rrd-db.sh
# #
sed -i "s/DB_NAME =.*/DB_NAME = hbmon/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sed -i "s/DB_USERNAME =.*/DB_USERNAME = hbmon/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sed -i "s/DB_PASSWORD =.*/DB_PASSWORD = hbmon/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sed -i "s/PRIVATE_NETWORK = True/PRIVATE_NETWORK = False/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sed -i "s/FILES_PATH =.*/FILES_PATH = \/opt\/FDMR-Monitor\/data/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
#
cd /opt/FDMR-Monitor/ cd /opt/FDMR-Monitor/
#sudo rm /opt/FDMR-Monitor/install.sh #sudo rm /opt/FDMR-Monitor/install.sh
################ ################
@ -435,15 +297,8 @@ sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/sysinfo/*.*
cd /opt/FDMR-Monitor/ cd /opt/FDMR-Monitor/
cp /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg /opt/FDMR-Monitor/fdmr-mon.cfg cp /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg /opt/FDMR-Monitor/fdmr-mon.cfg
############################### ###############################
sed -i "s|SUBSCRIBER_FILE =.*|SUBSCRIBER_FILE = subscriber_ids.json|g" /opt/FDMR-Monitor/fdmr-mon.cfg wget -O /opt/FDMR-Monitor/html/img/logo.png https://adn.systems/files/logo1.png
sed -i "s|SUBSCRIBER_URL.*|SUBSCRIBER_URL = https://adn.systems/files/subscriber_ids.json|g" /opt/FDMR-Monitor/fdmr-mon.cfg wget -O /opt/FDMR-Monitor/html/favicon.ico https://adn.systems/files/ADN_37x18_01.ico
sed -i "s|TGID_URL.*|TGID_URL = https://adn.systems/files/talkgroup_ids.json|g" /opt/FDMR-Monitor/fdmr-mon.cfg
sed -i "s|PEER_URL.*|PEER_URL = https://adn.systems/files/peer_ids.json|g" /opt/FDMR-Monitor/fdmr-mon.cfg
#
#wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1B-M7QNdf1gLVzbTn-Fi5GVPy6GTXcxJ-' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1B-M7QNdf1gLVzbTn-Fi5GVPy6GTXcxJ-" -O /opt/FDMR-Monitor/html/favicon.ico && rm -rf /tmp/cookies.txt &&
#
sed '6 a <link rel="shortcut icon" href="/favicon.ico" />' -i /opt/FDMR-Monitor/html/index.php
#wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1evvxLOh8uxKYYLoV0aORjDhFeLF42_S_' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1evvxLOh8uxKYYLoV0aORjDhFeLF42_S_" -O /opt/FDMR-Monitor/html/img/logo.png && rm -rf /tmp/cookies.txt &&
# #
sudo cat > /opt/FDMR-Monitor/html/buttons.php <<- "EOF" sudo cat > /opt/FDMR-Monitor/html/buttons.php <<- "EOF"
<!-- HBMonitor buttons HTML code --> <!-- HBMonitor buttons HTML code -->
@ -488,13 +343,12 @@ sudo cat > /opt/FDMR-Monitor/html/buttons.php <<- "EOF"
</div> </div>
</div> </div>
<div class="dropdown"> <div class="dropdown">
<button class="dropbtn">FreeDMR</button> <button class="dropbtn">ADN-Systems</button>
<div class="dropdown-content"> <div class="dropdown-content">
&nbsp; &nbsp;
<a class="button" href="https://freedmr-lh.gb7fr.org.uk/?limit=100&recent=1"target="_blank">&nbsp;Global Info FreeDMR&nbsp;</a> <a class="button" href="https://adn.systems/"target="_blank">&nbsp;Global Info ADN Systems;</a>
<a class="button" href="http://www.freedmr.uk/index.php/freedmr-servers/"target="_blank">&nbsp;Info Server&nbsp;</a> <a class="button" href="https://adn.systems/servers-list/"target="_blank">&nbsp;Info Server&nbsp;</a>
<a class="button" href="http://www.freedmr.uk/index.php/world-wide-talk-groups/"target="_blank">&nbsp;World Wide Talk Groups&nbsp;</a> <a class="button" href="https://t.me/ADN_Systems"target="_blank">&nbsp;World Wide Telegram Groups&nbsp;</a>
<a class="button" href="http://www.freedmr.uk/freedmr/option-calculator-b.php"target="_blank">&nbsp;Static TG Calculator&nbsp;</a>
&nbsp; &nbsp;
</div> </div>
</div> </div>
@ -526,202 +380,8 @@ EOF
cp -r /opt/FDMR-Monitor/html/* /var/www/fdmr/ cp -r /opt/FDMR-Monitor/html/* /var/www/fdmr/
sudo chown www-data:www-data /var/www/fdmr/ -R sudo chown www-data:www-data /var/www/fdmr/ -R
cp /opt/FDMR-Monitor/utils/logrotate/fdmr_mon /etc/logrotate.d/ cp /opt/FDMR-Monitor/utils/logrotate/fdmr_mon /etc/logrotate.d/
sudo cat > /opt/FDMR-Monitor/templates/main_table.html <<- "EOF"
<fieldset class="big">
<legend><b><font color="#000">&nbsp;.: Server Activity :.&nbsp;</font></b></legend>
{% if _table['MASTERS']|length >0 %}
<table style="table-layout:fixed;width:1100px; font: 10pt arial, sans-serif;margin-top:5px;margin-bottom:5px;" width=1100px>
<tr style="background-color:#265b8a;" "height:30px;font: 10pt arial, sans-serif;{{ themec }}">
<th>Systems M&P</th>
<th>Source</th>
<th>Destination</th>
</tr>
{% for _master in _table['MASTERS'] %}
{% for _client, _cdata in _table['MASTERS'][_master]['PEERS'].items() %}
{% if _cdata[1]['TS'] == True or _cdata[2]['TS'] == True %}
<tr style="background-color:#a1dcb5;">
{% if _cdata[1]['TRX'] == "RX" %}
<td style="font-weight:bold; padding-left: 20px; text-align:center;color:#464646;">M: {{_master}} </td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _cdata[1]['SUB']|safe }} [<span style="align-items: center;justify-content:center;font-size: 8pt;font-weight:600;color:brown;">TS {{ 1 if _cdata[1]['TS'] == True else 2 }}</span>]</td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#b5651d;">{{ _cdata[1]['DEST']|safe }}</td>
{% endif %}
{% if _cdata[2]['TRX'] == "RX" %}
<td style="font-weight:bold; padding-left: 20px; text-align:center;color:#464646"><b>M: {{_master}} </td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _cdata[2]['SUB']|safe }} [<span style="align-items: center;justify-content:center;font-size: 8pt;font-weight:600;color:brown;">TS {{ 1 if _cdata[1]['TS'] == True else 2 }}</span>]</td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#b5651d;">{{ _cdata[2]['DEST']|safe }}</td>
{% endif %}
</tr>
{% endif %}
{% endfor %}
{% endfor %}
{% else %}
<table style='width:1100px; font: 13pt arial, sans-serif; margin-top:8px;'>
<tr style='border:none; background-color:#f1f1f1;'>
<td style='border:none;height:60px;'><font color=brown><b><center>Waiting for Data from FreeDMR Server ...</center></b></td>
</tr>
</table>
{% endif %}
{% for _peer, _pdata in _table['PEERS'].items() %}
{% if _pdata[1]['TS'] == True or _pdata[2]['TS'] == True %}
<tr style="background-color:#f9f9f9f9;">
{% if _pdata[1]['TRX'] == "RX" %}
<td style="font-weight:bold; padding-left: 20px; text-align:center;color:#464646;">P: {{_peer}} </td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _pdata[1]['SUB']|safe }} [<span style="align-items: center;justify-content:center;font-size: 8pt;font-weight:600;color:brown;">TS {{ 1 if _pdata[1]['TS'] == True else 2 }}</span>]</td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#b5651d;">{{ _cdata[1]['DEST']|safe }}</td>
{% endif %}
{% if _pdata[2]['TRX'] == "RX" %}
<td style="font-weight:bold; padding-left: 20px; text-align:center;color:#464646;">P: {{_peer}} </td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _pdata[2]['SUB']|safe }} [<span style="align-items: center;justify-content:center;font-size: 8pt;font-weight:600;color:brown;">TS {{ 1 if _pdata[1]['TS'] == True else 2 }}</span>]</td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#b5651d;">{{ _pdata[2]['DEST']|safe }}</td>
{% endif %}
</tr>
{% endif %}
{% endfor %}
<tr style="background-color:#f0f0f0;"><td colspan=3 height=5pt><hr style="height:1px;border:none;color:#f0f0f0;background-color:#f0f0f0;"></hr></td></tr>
{% if _table['OPENBRIDGES']|length >0 %}
<tr style="background-color:#265b8a;" "height:30px;width:1100px; font: 10pt arial, sans-serif;{{ themec }}">
<th>Systems OpenBridge</th>
<th colspan=2 '>Active Incoming Calls</th>
</tr>
{% for _openbridge in _table['OPENBRIDGES'] %}
{% set rx = namespace(value=0) %}
{% if _table['OPENBRIDGES'][_openbridge]['STREAMS']|length >0 %}
{% for entry in _table['OPENBRIDGES'][_openbridge]['STREAMS'] if _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][0]=='RX' %}
{% set rx.value=1 %}
{% endfor %}
{% if rx.value == 1 %}
<tr style="background-color:#de8184;">
<td style="font-weight:bold; padding-left: 20px; text-align:center;"> {{ _openbridge}} </td>
<td colspan=2 style="background-color:#a1dcb5; font: 9pt arial, sans-serif; font-weight: 600; color:#464646;">
{% for entry in _table['OPENBRIDGES'][_openbridge]['STREAMS'] if _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][0] == 'RX' %}[<span style="color:#008000;">{{ _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][0] }}</span>: <font color=#0065ff> {{ _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][1] }}</font> >> <font color=#b5651d> {{ _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][2] }}</font>]&nbsp; {% endfor %}
</td>
</tr>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
</table>
</fieldset>
{% if _table['SETUP']['LASTHEARD'] == True %}
<fieldset class="big">
<legend><b>.: Lastheard :.</b></legend>
<table class="log">
<tr>
<th>Date</th>
<th>Time</th>
<th>Callsign (DMR-Id)</th>
<th>Name</th>
<th>TG#</th>
<th>TG Name</th>
<th>TX (s)</th>
<th>System</th>
</tr>
{% for itm in lastheard %}
<tr>
<td>{{ itm[0][:10] }}</td>
<td>{{ itm[0][11:] }}</td>
{% if not itm[7] %}
<td class="txt-464646"><b>{{ itm[6] }}</b></td>
<td></td>
{% else %}
<td><a target="_blank" href=https://qrz.com/db/{{itm[7][0]}}>{{ itm[7][0] }}</a></b><span class="fnt-7pt">&nbsp;({{ itm[6] }})</span></td>
<td <span style="color: #000000;"><b>{{ itm[7][1] }}</b></td>
{% endif %}
<td class="txt-b5651d"><b>{{ itm[4] }}</b></td>
<td <span style="color: #454545;"><b>{{ '' if not itm[5] else itm[5]|safe }}</b></td>
<td {{ 'class="bkgnd-1d1"'|safe if not itm[1] else '' }}>{{ 'DATA' if not itm[1] else itm[1]|int }}</td>
<td>{{ itm[3] }}</td>
</tr>
{% endfor %}
</table>
</fieldset>
{% endif %}
<fieldset class="big">
<legend><b>.: Connected to Server :.</b></legend>
<div class="conn2srv">
{% if _table['MASTERS']|length >0 %}
<tr style="background-color:#A7A2A2;"><td>
<br>
<div style="text-align:left;"><span style="color:#464646;font-weight:600;line-height:1.4;">&nbsp;&nbsp;LINKS:</span></div>
<div style="text-align:left;font:9.5pt arial, sans-serif;font-weight:bold;margin-left:25px; margin-right:25px;line-height:1.4;white-space:normal;">
{% for _master in _table['MASTERS'] %}
{% if _table['MASTERS'][_master]['PEERS']|length >0 %}
{% for _client, _cdata in _table['MASTERS'][_master]['PEERS'].items() %}
<span class="tooltip" style="border-bottom: 0px dotted white;">
<a style="border-bottom: 0px dotted white;font: 9.5pt arial,sans-serif;font-weight:bold;color:#0066ff;" target="_blank" href="http://www.qrz.com/db/{{_cdata['CALLSIGN']}}"><b>{{_cdata['CALLSIGN']}}</b></a>
<span class="tooltiptext" style="left:115%;top:-10px;">
<span style="font: 9pt arial,sans-serif;color:#3df8f8">
&nbsp;&nbsp;&nbsp;<b>DMR ID</b>: <b><font color=yellow>{{ _client }}</b></font><br>
{% if _cdata['RX_FREQ'] == 'N/A' and _cdata['TX_FREQ'] == 'N/A' %}
&nbsp;&nbsp;&nbsp;<b>Type: <font color=yellow>IP Network</font></b><br>
{% else %}
&nbsp;&nbsp;&nbsp;<b>Type: <font color=yellow>Radio</font></b> ({{ _cdata['SLOTS'] }})<br>
{% endif %}
&nbsp;&nbsp;&nbsp;<b>Hardware</b>: {{_cdata['PACKAGE_ID'] }}
<br>&nbsp;&nbsp;&nbsp;<b>Soft_Ver</b>: {{_cdata['SOFTWARE_ID'] }}
<br>&nbsp;&nbsp;&nbsp;<b>Info</b>: {{_cdata['LOCATION']}}
<br>&nbsp;&nbsp;&nbsp;<b>Master</b>: <font color=yellow>{{_master}}</font>
</span></span></span>&nbsp;
{% endfor %}
{% endif %}
{% endfor %}
</div>
{% endif %}
{% if _table['PEERS']|length >0 %}
<h4 class="tittle">PEERS:</h4>
<div class="hs-peers">
{% for _peer, _pdata in _table['PEERS'].items() %}
<div class="tooltip" style="border-bottom: 1px dotted white;{{'background-color:#98FB98; color:#464646;' if _table['PEERS'][_peer]['STATS']['CONNECTION'] == 'YES' else 'background-color:#ff0000; color:white;'}}"><b>&nbsp;&nbsp;{{_peer}}&nbsp;&nbsp;</b>
{% if _table['PEERS'][_peer]['STATS']['CONNECTION'] == 'YES' %}
<span class="tooltiptext c2s-pos2">Connected</span>
{% else %}
<span class="tooltiptext c2s-pos2"><b>Disconnected</b></span>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
</div>
</fieldset>
EOF
# #
sed -i "s/1100/1200/g" /opt/FDMR-Monitor/templates/*.*
#sed -i "s/Copyright (c) 2016-.*/Copyright (c) <?php \$cdate=date(\"Y\"); if (\$cdate > \"2016\") {\$cdate=\"2016-\".date(\"Y\");} echo \$cdate; ?><br>/g" /var/www/fdmr/*.php
#sed -i "s/meta name=\"description.*/meta name=\"description\" content=\"Copyright (c) 2016-22.The Regents of the K0USY Group. All rights reserved. Version OA4DOA 2022 (v270422)\">/g" /var/www/fdmr/*.php
sed -i '166 s/hotpink/#ad02fd/g' /var/www/fdmr/css/styles.php
sed -i '217 s/color:white/color:black/' /var/www/fdmr/css/styles.php
sed -i "251d" /var/www/fdmr/css/styles.php
sed '250 a <?php echo THEME_COLOR."\\n";?>' -i /var/www/fdmr/css/styles.php
sed '21 a # For custom color, select: pro' -i /opt/FDMR-Monitor/fdmr-mon.cfg
sed '24 a COLOR_TEXT = #fff519' -i /opt/FDMR-Monitor/fdmr-mon.cfg
sed '25 a COLOR_1 = #000080' -i /opt/FDMR-Monitor/fdmr-mon.cfg
sed '26 a COLOR_2 = #193dff' -i /opt/FDMR-Monitor/fdmr-mon.cfg
#sed '27 a COLOR_BACKGROUND = 5a5958' -i /opt/FDMR-Monitor/fdmr-mon.cfg
sed '45 a $cd1 = strtolower($config["GLOBAL"]["COLOR_1"]);' -i /var/www/fdmr/include/config.php
sed '46 a $cd2 = strtolower($config["GLOBAL"]["COLOR_2"]);' -i /var/www/fdmr/include/config.php
sed '47 a $cd3 = strtolower($config["GLOBAL"]["COLOR_TEXT"]);' -i /var/www/fdmr/include/config.php
sed '48 a $cd3 = strtolower($config["GLOBAL"]["COLOR_TEXT"]);' -i /var/www/fdmr/include/config.php
sed '49 a $cd4 = strtolower($config["GLOBAL"]["COLOR_BACKGROUND"]);' -i /var/www/fdmr/include/config.php
sed '66 a } elseif ($theme == "pro") {' -i /var/www/fdmr/include/config.php
sed '67 a $tc = "background-image: linear-gradient(to bottom, $cd1 0%, $cd2 100%);color:$cd3;";' -i /var/www/fdmr/include/config.php
#sed -i "s/THEME_COLOR =.*/THEME_COLOR = pro/g" /opt/FDMR-Monitor/fdmr-mon.cfg #sed -i "s/THEME_COLOR =.*/THEME_COLOR = pro/g" /opt/FDMR-Monitor/fdmr-mon.cfg
#sed -i "s/TGID_URL =.*/TGID_URL = https:\/\/freedmr.cymru\/talkgroups\/talkgroup_ids_json.php/g" /opt/FDMR-Monitor/fdmr-mon.cfg
if [ -f "mon.db" ] if [ -f "mon.db" ]
then then
rm mon.db rm mon.db
@ -733,9 +393,6 @@ python3 mon_db.py --update
systemctl stop apache2 systemctl stop apache2
systemctl disable apache2 systemctl disable apache2
##################### #####################
sed -i 's/b1eee9/3bb43d/' /var/www/fdmr/css/*.*
#sed -i "s/All rights reserved.<br>.*/All rights reserved.<br>, <a href=https:\/\/gitlab.hacknix.net\/hacknix\/FreeDMR\/-\/wikis\/Home>FreeDMR<\/a> by <a href=\"http:\/\/www.qrz.com\/db\/G7RZU\"target=\"_blank\">G7RZU hacknix<\/a>, Script project: <a title=\"Raspbian Proyect by HP3ICC © <?php \$cdate=date(\"Y\"); if (\$cdate > \"2018\") {\$cdate=\"2018-\".date(\"Y\");} echo \$cdate; ?>\" target=\"_blank\" href=https:\/\/gitlab.com\/hp3icc\/fdmr\/>FDMR+<\/a><br>/g" /var/www/fdmr/*.php
chmod +x /opt/FDMR-Monitor/sysinfo/* chmod +x /opt/FDMR-Monitor/sysinfo/*
sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh
(crontab -l; echo "*/5 * * * * sh /opt/FDMR-Monitor/sysinfo/graph.sh")|awk '!x[$0]++'|crontab - (crontab -l; echo "*/5 * * * * sh /opt/FDMR-Monitor/sysinfo/graph.sh")|awk '!x[$0]++'|crontab -
@ -753,7 +410,7 @@ Type=simple
Restart=always Restart=always
RestartSec=3 RestartSec=3
StandardOutput=null StandardOutput=null
ExecStart=/usr/bin/python3 /opt/FreeDMR/hotspot_proxy_v2.py -c /opt/FreeDMR/proxy.cfg ExecStart=/usr/bin/python3 /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py -c /opt/ADN-DMR-Peer-Server/proxy.cfg
#Restart=on-failure #Restart=on-failure
[Install] [Install]
@ -763,7 +420,7 @@ EOF
######### #########
bash -c "$(curl -fsSLk https://raw.githubusercontent.com/hp3icc/D-APRS/main/emq-daprs.sh)" bash -c "$(curl -fsSLk https://raw.githubusercontent.com/hp3icc/D-APRS/main/emq-daprs.sh)"
######### #########
sudo cat > /lib/systemd/system/freedmr.service <<- "EOF" sudo cat > /lib/systemd/system/adn-server.service <<- "EOF"
[Unit] [Unit]
Description=FreeDmr Description=FreeDmr
After=multi-user.target After=multi-user.target
@ -774,7 +431,7 @@ Type=simple
Restart=always Restart=always
RestartSec=3 RestartSec=3
StandardOutput=null StandardOutput=null
ExecStart=/usr/bin/python3 /opt/FreeDMR/bridge_master.py -c /opt/FreeDMR/config/FreeDMR.cfg ExecStart=/usr/bin/python3 /opt/ADN-DMR-Peer-Server/bridge_master.py -c /opt/ADN-DMR-Peer-Server/config/adn.cfg
#Restart=on-failure #Restart=on-failure
[Install] [Install]
@ -782,7 +439,7 @@ WantedBy=multi-user.target
EOF EOF
### ###
sudo cat > /lib/systemd/system/fdmrparrot.service <<- "EOF" sudo cat > /lib/systemd/system/adn-parrot.service <<- "EOF"
[Unit] [Unit]
Description=Freedmr Parrot Description=Freedmr Parrot
After=network-online.target syslog.target After=network-online.target syslog.target
@ -794,8 +451,8 @@ Type=simple
Restart=always Restart=always
RestartSec=3 RestartSec=3
StandardOutput=null StandardOutput=null
WorkingDirectory=/opt/FreeDMR WorkingDirectory=/opt/ADN-DMR-Peer-Server
ExecStart=/usr/bin/python3 /opt/FreeDMR/playback.py -c /opt/FreeDMR/playback.cfg ExecStart=/usr/bin/python3 /opt/ADN-DMR-Peer-Server/playback.py -c /opt/ADN-DMR-Peer-Server/config/parrot.cfg
#Restart=on-abort #Restart=on-abort
#Restart=on-failure #Restart=on-failure
@ -844,9 +501,7 @@ sudo git checkout Self_Service
#sudo pip install -U -r requirements.txt #sudo pip install -U -r requirements.txt
chmod 755 /opt/FDMR-Monitor2/data chmod 755 /opt/FDMR-Monitor2/data
#sed -i '72d' /opt/FDMR-Monitor2/html/include/navbar.php sudo chmod 644 /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
#sed '69 a \ <option value="es">ES</option>' -i /opt/FDMR-Monitor2/html/include/navbar.php
sudo chmod 644 /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sed -i 's/RELOAD_TIME =.*/RELOAD_TIME = 1/' /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i 's/RELOAD_TIME =.*/RELOAD_TIME = 1/' /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
sed -i 's/FREQUENCY =.*/FREQUENCY = 1/' /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i 's/FREQUENCY =.*/FREQUENCY = 1/' /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
sed -i "s/LANGUAGE =.*/LANGUAGE = \"es\"/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s/LANGUAGE =.*/LANGUAGE = \"es\"/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
@ -857,7 +512,7 @@ sed -i "s/TELEGRAM/#TELEGRAM/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /opt/FDMR-Monitor2/html/config.php sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /opt/FDMR-Monitor2/html/config.php
sed -i "s/PRIVATE_NETWORK = True/PRIVATE_NETWORK = False/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s/PRIVATE_NETWORK = True/PRIVATE_NETWORK = False/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
variable2=$(date +'%Y' | tail -c 5) variable2=$(date +'%Y' | tail -c 5)
#sed -i "s/CS8ABG<\/a> Dash/FDMR-Monitor2<\/a> by <a href=\"http:\/\/www.qrz.com\/db\/CS8ABG\"target=\"_blank\">CS8ABG<\/a>, <a href=https:\/\/gitlab.hacknix.net\/hacknix\/FreeDMR\/-\/wikis\/Home>FreeDMR<\/a> by <a href=\"http:\/\/www.qrz.com\/db\/G7RZU\"target=\"_blank\">G7RZU hacknix<\/a>, Script project: <a title=\"Raspbian Proyect by HP3ICC © 2018-$variable2\" href=\"https:\/\/gitlab.com\/hp3icc\/fdmr\/\"target=\"_blank\">FDMR+<\/a>/g" /opt/FDMR-Monitor2/html/include/footer.php #sed -i "s/CS8ABG<\/a> Dash/FDMR-Monitor2<\/a> by <a href=\"http:\/\/www.qrz.com\/db\/CS8ABG\"target=\"_blank\">CS8ABG<\/a>, <a href=https:\/\/gitlab.hacknix.net\/hacknix\/FreeDMR\/-\/wikis\/Home>FreeDMR<\/a> by <a href=\"http:\/\/www.qrz.com\/db\/G7RZU\"target=\"_blank\">G7RZU hacknix<\/a>, Script project: <a title=\"Script proyect by HP3ICC © 2018-$variable2\" href=\"https:\/\/gitlab.com\/hp3icc\/fdmr\/\"target=\"_blank\">FDMR+<\/a>/g" /opt/FDMR-Monitor2/html/include/footer.php
sed -i "s|SUBSCRIBER_URL.*|SUBSCRIBER_URL = https://adn.systems/files/subscriber_ids.json|g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s|SUBSCRIBER_URL.*|SUBSCRIBER_URL = https://adn.systems/files/subscriber_ids.json|g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
sed -i "s|TGID_URL.*|TGID_URL = https://adn.systems/files/talkgroup_ids.json|g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s|TGID_URL.*|TGID_URL = https://adn.systems/files/talkgroup_ids.json|g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
sed -i "s|PEER_URL.*|PEER_URL = https://adn.systems/files/peer_ids.json|g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s|PEER_URL.*|PEER_URL = https://adn.systems/files/peer_ids.json|g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
@ -869,11 +524,12 @@ sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /
#sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /var/www/fdmr2/ssconfunc.php #sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /var/www/fdmr2/ssconfunc.php
########################################################## ##########################################################
wget -q --no-check-certificate -r 'https://docs.google.com/uc?export=download&id=1cWqClH0FUxV5d-rVnibI_-iCypFnTDb3' -O /opt/FDMR-Monitor2/html/img/bk.jpg && wget -q --no-check-certificate -r 'https://docs.google.com/uc?export=download&id=1cWqClH0FUxV5d-rVnibI_-iCypFnTDb3' -O /opt/FDMR-Monitor2/html/img/bk.jpg &&
wget -q --no-check-certificate -r 'https://docs.google.com/uc?export=download&id=1vsviKjpZmL_mWVEW2UstNODGPl8-uNVo' -O /opt/flags.zip && #wget -q --no-check-certificate -r 'https://docs.google.com/uc?export=download&id=1vsviKjpZmL_mWVEW2UstNODGPl8-uNVo' -O /opt/flags.zip &&
#sudo unzip -o /opt/flags.zip -d /opt/FDMR-Monitor2/html/flags/ &&
sudo unzip -o /opt/flags.zip -d /opt/FDMR-Monitor2/html/flags/ && #rm /opt/flags.zip
rm /opt/flags.zip wget -O /opt/FDMR-Monitor2/html/img/logo.png https://adn.systems/files/logo1.png
wget -O /opt/FDMR-Monitor2/html/img/favicon.ico https://adn.systems/files/ADN_37x18_01.ico
wget -O /opt/FDMR-Monitor2/html/img/Logo_mini.png https://adn.systems/files/Logo_mini.png
cp fdmr-mon_SAMPLE.cfg fdmr-mon.cfg cp fdmr-mon_SAMPLE.cfg fdmr-mon.cfg
sudo chmod 644 fdmr-mon.cfg sudo chmod 644 fdmr-mon.cfg
sudo cp /opt/FDMR-Monitor2/html/* /var/www/fdmr2/ -r sudo cp /opt/FDMR-Monitor2/html/* /var/www/fdmr2/ -r

@ -33,13 +33,12 @@ cd /
################## ##################
#!/bin/bash #!/bin/bash
if ! grep -q "Web-Dashboar-name" "/opt/wdp" > /dev/null 2>&1; then if ! grep -q "Web-Dashboar-name" "/opt/wdp" > /dev/null 2>&1; then
sudo cat > /opt/wdp <<- "EOFX" cat > /opt/wdp <<- "EOFX"
#!/bin/bash ############################################
######################################### # Select number port, ADN-Server Dashboard #
# Select number port, FreeDMR Dashboard # ############################################
#########################################
Web-Dashboar-name: freedmr Web-Dashboar-name: adn
Web-Dashboar-Port: 80 Web-Dashboar-Port: 80
Web-Dashboar-dns: Web-Dashboar-dns:
Web-Dashboar-dir: /var/www/fdmr2 Web-Dashboar-dir: /var/www/fdmr2
@ -48,6 +47,9 @@ Web-Dashboar-soft: /opt/FDMR-Monitor2
EOFX EOFX
fi fi
if ! grep -q "Web-Dashboar-name: adn" "/opt/wdp" > /dev/null 2>&1; then
sed -i "s|Web-Dashboar-name:.*|Web-Dashboar-name: adn|g" /opt/wdp
fi
if [ ! -f "/etc/nginx/sites-available/000" ]; then if [ ! -f "/etc/nginx/sites-available/000" ]; then
bash -c "$(curl -fsSLk https://gitlab.com/hp3icc/emq-TE1/-/raw/main/install/nginx.sh)" bash -c "$(curl -fsSLk https://gitlab.com/hp3icc/emq-TE1/-/raw/main/install/nginx.sh)"
fi fi
@ -119,9 +121,9 @@ if [[ $EUID -ne 0 ]]; then
fi fi
while : ; do while : ; do
choix=$(whiptail --title "Raspbian Proyect HP3ICC / update FDMR" --menu "Nota Importante: antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo todas las configuraciones, al finalizar la actualizacion el servicio se reinniciara automaticamente. choix=$(whiptail --title "Script proyect HP3ICC / update FDMR+" --menu "Nota Importante: antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo todas las configuraciones, al finalizar la actualizacion el servicio se reinniciara automaticamente.
" 17 50 4 \ " 17 50 4 \
1 " Update FreeDMR " \ 1 " Update ADN-Server " \
2 " Update FDMR-Monitor OA4DOA " \ 2 " Update FDMR-Monitor OA4DOA " \
3 " Update FDMR-Monitor CS8ABG " \ 3 " Update FDMR-Monitor CS8ABG " \
4 " Menu Principal " 3>&1 1>&2 2>&3) 4 " Menu Principal " 3>&1 1>&2 2>&3)
@ -136,7 +138,7 @@ fi
# case : action en fonction du choix # case : action en fonction du choix
case $choix in case $choix in
1) 1)
menu-up-fdm ;; menu-up-adn ;;
2) 2)
menu-up-fdmon ;; menu-up-fdmon ;;
3) 3)
@ -151,7 +153,7 @@ exit 0
EOF EOF
# #
sudo cat > /bin/menu-up-fdm <<- "EOF" sudo cat > /bin/menu-up-adn <<- "EOF"
#!/bin/bash #!/bin/bash
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50 whiptail --title "sudo su" --msgbox "requiere ser usuario root , escriba (sudo su) antes de entrar a menu / requires root user, type (sudo su) before entering menu" 0 50
@ -159,11 +161,11 @@ if [[ $EUID -ne 0 ]]; then
fi fi
while : ; do while : ; do
choix=$(whiptail --title "Raspbian Proyect HP3ICC / update FreeDMR" --menu "Nota Importante: debe debe agregar todos sus obp en la opcion numero uno, ( 1-Lista de OBP )antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo la carpeta /opt/FreeDMR, al finalizar la actualizacion el servicio Freedmr se reinniciara automaticamente. choix=$(whiptail --title "Script proyect HP3ICC / update ADN-Server" --menu "Nota Importante: debe debe agregar todos sus obp en la opcion numero uno, ( 1-Lista de OBP )antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo la carpeta /opt/ADN-DMR-Peer-Server, al finalizar la actualizacion el servicio Freedmr se reinniciara automaticamente.
" 18 55 5 \ " 18 55 5 \
1 " List OBP " \ 1 " List OBP " \
2 " shell extra " \ 2 " shell extra " \
3 " Iniciar Actualizacion FreeDMR " \ 3 " Iniciar Actualizacion ADN-Server " \
4 " Menu Principal " 3>&1 1>&2 2>&3) 4 " Menu Principal " 3>&1 1>&2 2>&3)
exitstatus=$? exitstatus=$?
#on recupere ce choix #on recupere ce choix
@ -197,7 +199,7 @@ if [[ $EUID -ne 0 ]]; then
fi fi
while : ; do while : ; do
choix=$(whiptail --title "Raspbian Proyect HP3ICC / update FDMR-Monitor OA4DOA" --menu "Nota Importante: antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo todas las configuraciones, al finalizar la actualizacion el servicio se reinniciara automaticamente. choix=$(whiptail --title "Script proyect HP3ICC / update FDMR-Monitor OA4DOA" --menu "Nota Importante: antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo todas las configuraciones, al finalizar la actualizacion el servicio se reinniciara automaticamente.
" 17 50 4 \ " 17 50 4 \
1 " shell extra " \ 1 " shell extra " \
2 " Iniciar Actualizacion FDMR-Monitor OA4DOA " \ 2 " Iniciar Actualizacion FDMR-Monitor OA4DOA " \
@ -232,7 +234,7 @@ if [[ $EUID -ne 0 ]]; then
fi fi
while : ; do while : ; do
choix=$(whiptail --title "Raspbian Proyect HP3ICC / update FDMR-Monitor CS8ABG" --menu "Nota Importante: antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo todas las configuraciones, al finalizar la actualizacion el servicio se reinniciara automaticamente. choix=$(whiptail --title "Script proyect HP3ICC / update FDMR-Monitor CS8ABG" --menu "Nota Importante: antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo todas las configuraciones, al finalizar la actualizacion el servicio se reinniciara automaticamente.
" 17 50 4 \ " 17 50 4 \
1 " shell extra " \ 1 " shell extra " \
2 " Iniciar Actualizacion FDMR-Monitor CS8ABG" \ 2 " Iniciar Actualizacion FDMR-Monitor CS8ABG" \
@ -260,80 +262,7 @@ exit 0
EOF EOF
######################################### FreeDMR Update ############################################################### ######################################### ADN-Server Update ###############################################################
sudo cat > /opt/conf.txt <<- "EOFA1"
[D-APRS]
MODE: MASTER
ENABLED: True
REPEAT: False
MAX_PEERS: 1
EXPORT_AMBE: False
IP:
PORT: 52555
PASSPHRASE:
GROUP_HANGTIME: 0
USE_ACL: True
REG_ACL: DENY:1
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL
DEFAULT_UA_TIMER: 10
SINGLE_MODE: False
VOICE_IDENT: False
TS1_STATIC:
TS2_STATIC:
DEFAULT_REFLECTOR: 0
ANNOUNCEMENT_LANGUAGE: es_ES
GENERATOR: 2
ALLOW_UNREG_ID: True
PROXY_CONTROL: False
OVERRIDE_IDENT_TG:
[ECHO]
MODE: PEER
ENABLED: True
LOOSE: True
EXPORT_AMBE: False
IP:
#127.0.0.1
PORT: 49060
MASTER_IP: 127.0.0.1
MASTER_PORT: 49061
PASSPHRASE: passw0rd
CALLSIGN: ECHOTEST
RADIO_ID: 9990
RX_FREQ: 449000000
TX_FREQ: 444000000
TX_POWER: 25
COLORCODE: 1
SLOTS: 3
LATITUDE: 38.0000
LONGITUDE: -095.0000
HEIGHT: 75
LOCATION: Local Parrot
DESCRIPTION: This is a cool repeater
URL: www.w1abc.org
SOFTWARE_ID: 20170620
PACKAGE_ID: MMDVM_HBlink
GROUP_HANGTIME: 3
OPTIONS:
#TS2=9990;DIAL=0;VOICE=0;TIMER=0
USE_ACL: True
SUB_ACL: DENY:1
TGID_TS1_ACL: DENY:ALL
TGID_TS2_ACL: PERMIT:9990
TS1_STATIC:
TS2_STATIC:9990
DEFAULT_REFLECTOR: 0
ANNOUNCEMENT_LANGUAGE: en_GB
GENERATOR: 0
DEFAULT_UA_TIMER: 999
SINGLE_MODE: True
VOICE_IDENT: False
EOFA1
#############################
sudo cat > /opt/fdmr-update.sh <<- "EOFD1" sudo cat > /opt/fdmr-update.sh <<- "EOFD1"
#!/bin/bash #!/bin/bash
apps=("mariadb-server" "php" "libapache2-mod-php" "php-zip" "php-mbstring" "php-cli" "php-common" "php-curl" "php-xml" "php-mysql") apps=("mariadb-server" "php" "libapache2-mod-php" "php-zip" "php-mbstring" "php-cli" "php-common" "php-curl" "php-xml" "php-mysql")
@ -377,15 +306,35 @@ echo "${commands}" | /usr/bin/mysql -u root
/usr/bin/python3 -m pip install --upgrade spyne /usr/bin/python3 -m pip install --upgrade spyne
############### ###############
cd / cd /
variable=$(grep "SERVER_ID:" /opt/FreeDMR/config/FreeDMR.cfg | grep -Eo '[0-9]{1,9}') variable=$(grep "SERVER_ID:" /opt/ADN-DMR-Peer-Server/config/adn.cfg | grep -Eo '[0-9]{1,9}')
if [ -z "$variable" ] if [ -z "$variable" ]
then variable=0000 then variable=0000
fi fi
sudo systemctl stop freedmr.service
sudo systemctl stop proxy.service SERVICIOS=("adn-server.service" "freedmr.service" "proxy.service" "adn-parrot.service" "parrot.service")
sudo systemctl stop fdmrparrot.service
#sudo /usr/bin/python3 -m pip install --upgrade spyne for servicio in "${SERVICIOS[@]}"; do
# Verificar si el servicio existe
if systemctl list-unit-files --type=service | grep -q "^$servicio "; then
echo "El servicio $servicio existe."
# Verificar si el servicio está activo
if systemctl is-active --quiet $servicio; then
echo "El servicio $servicio está activo. Deteniendo..."
sudo systemctl stop $servicio
else
echo "El servicio $servicio no está activo."
fi
# Deshabilitar el servicio
echo "Deshabilitando el servicio $servicio..."
sudo systemctl disable $servicio
else
echo "El servicio $servicio no existe."
fi
done
######################### #########################
#Service #Service
@ -400,7 +349,7 @@ Type=simple
Restart=always Restart=always
RestartSec=3 RestartSec=3
StandardOutput=null StandardOutput=null
ExecStart=/usr/bin/python3 /opt/FreeDMR/hotspot_proxy_v2.py -c /opt/FreeDMR/proxy.cfg ExecStart=/usr/bin/python3 /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py -c /opt/ADN-DMR-Peer-Server/proxy.cfg
#Restart=on-failure #Restart=on-failure
[Install] [Install]
@ -408,7 +357,7 @@ WantedBy=multi-user.target
EOF EOF
######### #########
sudo cat > /lib/systemd/system/freedmr.service <<- "EOF" sudo cat > /lib/systemd/system/adn-server.service <<- "EOF"
[Unit] [Unit]
Description=FreeDmr Description=FreeDmr
After=multi-user.target After=multi-user.target
@ -419,7 +368,7 @@ Type=simple
Restart=always Restart=always
RestartSec=3 RestartSec=3
StandardOutput=null StandardOutput=null
ExecStart=/usr/bin/python3 /opt/FreeDMR/bridge_master.py -c /opt/FreeDMR/config/FreeDMR.cfg ExecStart=/usr/bin/python3 /opt/ADN-DMR-Peer-Server/bridge_master.py -c /opt/ADN-DMR-Peer-Server/config/adn.cfg
#Restart=on-failure #Restart=on-failure
@ -428,7 +377,7 @@ WantedBy=multi-user.target
EOF EOF
### ###
sudo cat > /lib/systemd/system/fdmrparrot.service <<- "EOF" sudo cat > /lib/systemd/system/adn-parrot.service <<- "EOF"
[Unit] [Unit]
Description=Freedmr Parrot Description=Freedmr Parrot
After=network-online.target syslog.target After=network-online.target syslog.target
@ -440,8 +389,8 @@ Type=simple
Restart=always Restart=always
RestartSec=3 RestartSec=3
StandardOutput=null StandardOutput=null
WorkingDirectory=/opt/FreeDMR WorkingDirectory=/opt/ADN-DMR-Peer-Server
ExecStart=/usr/bin/python3 /opt/FreeDMR/playback.py -c /opt/FreeDMR/playback.cfg ExecStart=/usr/bin/python3 /opt/ADN-DMR-Peer-Server/playback.py -c /opt/ADN-DMR-Peer-Server/config/parrot.cfg
#Restart=on-abort #Restart=on-abort
#Restart=on-failure #Restart=on-failure
@ -450,9 +399,9 @@ WantedBy=multi-user.target
EOF EOF
# #
if [ -d "/opt/FreeDMR" ] if [ -d "/opt/ADN-DMR-Peer-Server" ]
then then
sudo rm -r /opt/FreeDMR sudo rm -r /opt/ADN-DMR-Peer-Server
fi fi
if [ -d "/var/log/FreeDMR" ] if [ -d "/var/log/FreeDMR" ]
then then
@ -462,168 +411,52 @@ fi
#sudo -H pip3 install --upgrade pip #sudo -H pip3 install --upgrade pip
#pip install pyopenssl --upgrade #pip install pyopenssl --upgrade
cd /opt cd /opt
git clone https://gitlab.hacknix.net/hacknix/FreeDMR.git git clone https://github.com/Amateur-Digital-Network/ADN-DMR-Peer-Server.git
cd FreeDMR cd ADN-DMR-Peer-Server
sudo git checkout v1.3.19 sudo git checkout develop
if [ ! -d "/opt/FreeDMR/config" ] sudo chmod -R +x /opt/ADN-DMR-Peer-Server/*
then if [ ! -d "/var/log/ADN" ]
mkdir -p /opt/FreeDMR/config
fi
if [ ! -d "/var/log/FreeDMR" ]
then then
mkdir -p /var/log/FreeDMR mkdir -p /var/log/ADN
fi fi
sudo cat > /opt/conf.txt <<- "EOF" ####
cp /opt/ADN-DMR-Peer-Server/config/ADN-SAMPLE.cfg /opt/ADN-DMR-Peer-Server/config/adn.cfg
[D-APRS] sudo sed -i "s/SERVER_ID: .*/SERVER_ID: $variable/g" /opt/ADN-DMR-Peer-Server/config/adn.cfg
MODE: MASTER
ENABLED: True cd /opt/ADN-DMR-Peer-Server/
REPEAT: False
MAX_PEERS: 1
EXPORT_AMBE: False
IP:
PORT: 52555
PASSPHRASE:
GROUP_HANGTIME: 0
USE_ACL: True
REG_ACL: DENY:1
SUB_ACL: DENY:1
TGID_TS1_ACL: PERMIT:ALL
TGID_TS2_ACL: PERMIT:ALL
DEFAULT_UA_TIMER: 10
SINGLE_MODE: False
VOICE_IDENT: False
TS1_STATIC:
TS2_STATIC:
DEFAULT_REFLECTOR: 0
ANNOUNCEMENT_LANGUAGE: es_ES
GENERATOR: 2
ALLOW_UNREG_ID: True
PROXY_CONTROL: False
OVERRIDE_IDENT_TG:
[ECHO]
MODE: PEER
ENABLED: True
LOOSE: True
EXPORT_AMBE: False
IP:
#127.0.0.1
PORT: 49060
MASTER_IP: 127.0.0.1
MASTER_PORT: 49061
PASSPHRASE: passw0rd
CALLSIGN: ECHOTEST
RADIO_ID: 9990
RX_FREQ: 449000000
TX_FREQ: 444000000
TX_POWER: 25
COLORCODE: 1
SLOTS: 3
LATITUDE: 38.0000
LONGITUDE: -095.0000
HEIGHT: 75
LOCATION: Local Parrot
DESCRIPTION: This is a cool repeater
URL: www.w1abc.org
SOFTWARE_ID: 20170620
PACKAGE_ID: MMDVM_HBlink
GROUP_HANGTIME: 3
OPTIONS:
#TS2=9990;DIAL=0;VOICE=0;TIMER=0
USE_ACL: True
SUB_ACL: DENY:1
TGID_TS1_ACL: DENY:ALL
TGID_TS2_ACL: PERMIT:9990
TS1_STATIC:
TS2_STATIC:9990
DEFAULT_REFLECTOR: 0
ANNOUNCEMENT_LANGUAGE: en_GB
GENERATOR: 0
DEFAULT_UA_TIMER: 999
SINGLE_MODE: True
VOICE_IDENT: False
EOF
###
if [ "$(cat /opt/FreeDMR/FreeDMR-SAMPLE.cfg | grep 'KEYS_FILE')" != "" ]; then
sudo sed -i 's/KEYS_FILE:.*/KEYS_FILE: keys.json/' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
else
sudo sed '45 a KEYS_FILE: keys.json' -i /opt/FreeDMR/FreeDMR-SAMPLE.cfg
fi
sed -i '/\[OBP-TEST\]/,/\[/{s/TGID_ACL: [^ ]*/TGID_ACL: DENY:0-82,92-199,800-899,9990-9999,900999/}' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|ANNOUNCEMENT_LANGUAGE:.*|ANNOUNCEMENT_LANGUAGE: es_ES|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|54000|56400|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|PROTO_VER:.*|PROTO_VER: 5|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
#sed -i "s|VALIDATE_SERVER_IDS:.*|VALIDATE_SERVER_IDS: False|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|PROXY_CONTROL:.*|PROXY_CONTROL: False|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
#
sed -i "s|SINGLE_MODE:.*|SINGLE_MODE: False|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|VOICE_IDENT:.*|VOICE_IDENT: False|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|PEER_FILE:.*|PEER_FILE: peer_ids.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|SUBSCRIBER_FILE:.*|SUBSCRIBER_FILE: subscriber_ids.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|TGID_FILE:.*|TGID_FILE: talkgroup_ids.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|PEER_URL:.*|PEER_URL: https://adn.systems/files/peer_ids.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|SUBSCRIBER_URL:.*|SUBSCRIBER_URL: https://adn.systems/files/subscriber_ids.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|TGID_URL:.*|TGID_URL: https://adn.systems/files/talkgroup_ids.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|STALE_TIME:.*|STALE_TIME: 1|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|SUB_MAP_FILE:.*|SUB_MAP_FILE: sub_map.pkl|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|SERVER_ID_FILE:.*|SERVER_ID_FILE: server_ids.tsv|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|CHECKSUM_URL:.*|CHECKSUM_URL: https://adn.systems/files/file_checksums.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|CHECKSUM_FILE:.*|CHECKSUM_FILE: file_checksums.json|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
sed -i "s|SERVER_ID_URL:.*|SERVER_ID_URL: https://adn.systems/files/server_ids.tsv|g" /opt/FreeDMR/FreeDMR-SAMPLE.cfg
#
wget https://adn.systems/files/cwadnsystems.ambe -O /opt/FreeDMR/Audio/CW/freedmr.ambe
wget https://adn.systems/files/adn.ambe -O /opt/FreeDMR/Audio/es_ES/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/en_GB/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/en_GB_2/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/fr_FR/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/pt_PT/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/th_TH/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/de_DE/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/cy_GB/freedmr.ambe
cp /opt/FreeDMR/Audio/es_ES/freedmr.ambe /opt/FreeDMR/Audio/el_GR/freedmr.ambe
cp /opt/FreeDMR/FreeDMR-SAMPLE.cfg /opt/FreeDMR-SAMPLE.cfg
cd /opt/
sudo cat FreeDMR-SAMPLE.cfg conf.txt obp.txt >> /opt/FreeDMR/config/FreeDMR.cfg
sudo sed -i 's/file-timed/console-timed/' /opt/FreeDMR/config/FreeDMR.cfg
sudo sed -i 's/INFO/DEBUG/' /opt/FreeDMR/config/FreeDMR.cfg
sudo sed -i 's/freedmr.log/\/var\/log\/FreeDMR\/FreeDMR.log/' /opt/FreeDMR/config/FreeDMR.cfg
sudo sed -i "s/SERVER_ID: .*/SERVER_ID: $variable/g" /opt/FreeDMR/config/FreeDMR.cfg
rm /opt/conf.txt
rm /opt/FreeDMR-SAMPLE.cfg
cd /opt/FreeDMR/
mv loro.cfg /opt/FreeDMR/playback.cfg
sudo sed -i 's/54915/49061/' /opt/FreeDMR/playback.cfg
############# #############
wget https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/Self_Service/proxy/hotspot_proxy_v2.py -O /opt/FreeDMR/hotspot_proxy_v2.py wget https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/Self_Service/proxy/hotspot_proxy_v2.py -O /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
wget https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/Self_Service/proxy/proxy_SAMPLE.cfg -O /opt/FreeDMR/proxy.cfg wget https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/Self_Service/proxy/proxy_SAMPLE.cfg -O /opt/ADN-DMR-Peer-Server/proxy.cfg
wget https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/Self_Service/proxy/proxy_db.py -O /opt/FreeDMR/proxy_db.py wget https://raw.githubusercontent.com/CS8ABG/FDMR-Monitor/Self_Service/proxy/proxy_db.py -O /opt/ADN-DMR-Peer-Server/proxy_db.py
#################### ####################
sed -i "s/db_username =.*/db_username = 'hbmon'/g" /opt/FreeDMR/hotspot_proxy_v2.py sed -i "s/db_username =.*/db_username = 'hbmon'/g" /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
sed -i "s/db_password =.*/db_password = 'hbmon'/g" /opt/FreeDMR/hotspot_proxy_v2.py sed -i "s/db_password =.*/db_password = 'hbmon'/g" /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
sed -i "s/db_name =.*/db_name = 'hbmon'/g" /opt/FreeDMR/hotspot_proxy_v2.py sed -i "s/db_name =.*/db_name = 'hbmon'/g" /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
sed -i "s/\/freedmr.cfg/\/config\/FreeDMR.cfg/g" /opt/FreeDMR/hotspot_proxy_v2.py sed -i "s/\/freedmr.cfg/\/config\/adn.cfg/g" /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
sed -i "s/db_selfcare =.*/db_selfcare = ProxyDB('localhost', 'hbmon', 'hbmon', 'hbmon', 3306)/g" /opt/FreeDMR/proxy_db.py sed -i "s/db_selfcare =.*/db_selfcare = ProxyDB('localhost', 'hbmon', 'hbmon', 'hbmon', 3306)/g" /opt/ADN-DMR-Peer-Server/proxy_db.py
sed -i "s/USERNAME =.*/USERNAME = hbmon/g" /opt/FreeDMR/proxy.cfg sed -i "s/USERNAME =.*/USERNAME = hbmon/g" /opt/ADN-DMR-Peer-Server/proxy.cfg
sed -i "s/PASSWORD =.*/PASSWORD = hbmon/g" /opt/FreeDMR/proxy.cfg sed -i "s/PASSWORD =.*/PASSWORD = hbmon/g" /opt/ADN-DMR-Peer-Server/proxy.cfg
sed -i "s/DB_NAME =.*/DB_NAME = hbmon/g" /opt/FreeDMR/proxy.cfg sed -i "s/DB_NAME =.*/DB_NAME = hbmon/g" /opt/ADN-DMR-Peer-Server/proxy.cfg
sed -i "s/54000/56400/g" /opt/FreeDMR/proxy_db.py sed -i "s/54000/56400/g" /opt/ADN-DMR-Peer-Server/proxy_db.py
sed -i "s/54000/56400/g" /opt/FreeDMR/proxy.cfg sed -i "s/54000/56400/g" /opt/ADN-DMR-Peer-Server/proxy.cfg
sed -i "s/54100/56499/g" /opt/FreeDMR/proxy_db.py sed -i "s/54100/56499/g" /opt/ADN-DMR-Peer-Server/proxy_db.py
sed -i "s/54100/56499/g" /opt/FreeDMR/proxy.cfg sed -i "s/54100/56499/g" /opt/ADN-DMR-Peer-Server/proxy.cfg
sed -i "s/54000/56400/g" /opt/FreeDMR/hotspot_proxy_v2.py sed -i "s/54000/56400/g" /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
sed -i "s/54100/56499/g" /opt/FreeDMR/hotspot_proxy_v2.py sed -i "s/54100/56499/g" /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
sed -i "s/1234567/1234567,1231237,123123701/g" /opt/FreeDMR/proxy.cfg sed -i "s/1234567/1234567,1231237,123123701/g" /opt/ADN-DMR-Peer-Server/proxy.cfg
#sed -i '228s/20/50/' /opt/FreeDMR/hotspot_proxy_v2.py #sed -i '228s/20/50/' /opt/ADN-DMR-Peer-Server/hotspot_proxy_v2.py
################# #################
sudo chmod +x /opt/FreeDMR/*.py sudo chmod +x /opt/ADN-DMR-Peer-Server/*.py
#sudo chmod +x /opt/FreeDMR/config/*.py #sudo chmod +x /opt/ADN-DMR-Peer-Server/config/*.py
sh /opt/extra-1.sh sh /opt/extra-1.sh
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl start proxy.service sudo systemctl start proxy.service
sudo systemctl start freedmr.service sudo systemctl start adn-server.service
sudo systemctl start fdmrparrot.service sudo systemctl start adn-parrot.service
sudo systemctl enable proxy.service
sudo systemctl enable adn-server.service
sudo systemctl enable adn-parrot.service
if systemctl status fdmr_mon.service |grep "service; enabled;" >/dev/null 2>&1 if systemctl status fdmr_mon.service |grep "service; enabled;" >/dev/null 2>&1
then then
sudo systemctl stop fdmr_mon.service sudo systemctl stop fdmr_mon.service
@ -650,7 +483,9 @@ if [[ $EUID -ne 0 ]]; then
echo "Este script debe ejecutarse como usuario ROOT" echo "Este script debe ejecutarse como usuario ROOT"
exit 1 exit 1
fi fi
if ! grep -q "Web-Dashboar-name: adn" "/opt/wdp" > /dev/null 2>&1; then
sed -i "s|Web-Dashboar-name:.*|Web-Dashboar-name: adn|g" /opt/wdp
fi
############## ##############
cd /opt cd /opt
@ -749,31 +584,14 @@ sudo chmod +x install.sh
chmod 777 /opt/FDMR-Monitor/data chmod 777 /opt/FDMR-Monitor/data
sudo chmod 644 /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg sudo chmod 644 /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sudo sed -i 's/RELOAD_TIME =.*/RELOAD_TIME = 1/' /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sudo sed -i 's/FREQUENCY =.*/FREQUENCY = 1/' /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sudo sed '33 a <!--' -i /opt/FDMR-Monitor/html/sysinfo.php
sudo sed '35 a -->' -i /opt/FDMR-Monitor/html/sysinfo.php
#### ####
sudo sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/html/*.* sudo sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/html/*.*
sudo sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/sysinfo/*.* sudo sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/sysinfo/*.*
sudo sed -i "s/1100/1200/g" /opt/FDMR-Monitor/html/*.*
sudo sed -i "s/1100/1200/g" /opt/FDMR-Monitor/html/css/*.*
sudo sed -i "s/1100/1200/g" /opt/FDMR-Monitor/templates/*.*
sudo sed -i 's/b1eee9/3bb43d/' /opt/FDMR-Monitor/html/css/*.*
#### ####
sudo sed -i 's/localhost_2-day.png/localhost_1-day.png/' /opt/FDMR-Monitor/html/sysinfo.php
sudo sed -i "s/HBMonv2/FDMR-Monitor/g" /opt/FDMR-Monitor/sysinfo/*.sh
sudo chmod +x /opt/FDMR-Monitor/sysinfo/cpu.sh sudo chmod +x /opt/FDMR-Monitor/sysinfo/cpu.sh
sudo chmod +x /opt/FDMR-Monitor/sysinfo/graph.sh sudo chmod +x /opt/FDMR-Monitor/sysinfo/graph.sh
sudo chmod +x /opt/FDMR-Monitor/sysinfo/rrd-db.sh sudo chmod +x /opt/FDMR-Monitor/sysinfo/rrd-db.sh
sed -i "s/DB_NAME =.*/DB_NAME = hbmon/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sed -i "s/DB_USERNAME =.*/DB_USERNAME = hbmon/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sed -i "s/DB_PASSWORD =.*/DB_PASSWORD = hbmon/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sudo sed -i "s/PRIVATE_NETWORK = True/PRIVATE_NETWORK = False/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sudo sed -i "s/FILES_PATH =.*/FILES_PATH = \/opt\/FDMR-Monitor\/data/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
cd /opt/FDMR-Monitor/ cd /opt/FDMR-Monitor/
#sudo rm /opt/FDMR-Monitor/install.sh #sudo rm /opt/FDMR-Monitor/install.sh
################ ################
@ -786,17 +604,8 @@ sudo sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/sysinfo/*.*
cd /opt/FDMR-Monitor/ cd /opt/FDMR-Monitor/
cp /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg /opt/FDMR-Monitor/fdmr-mon.cfg cp /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg /opt/FDMR-Monitor/fdmr-mon.cfg
############################### ###############################
sed -i "s|SUBSCRIBER_URL.*|SUBSCRIBER_URL = https://adn.systems/files/subscriber_ids.json|g" /opt/FDMR-Monitor/fdmr-mon.cfg wget -O /opt/FDMR-Monitor/html/img/logo.png https://adn.systems/files/logo1.png
sed -i "s|TGID_URL.*|TGID_URL = https://adn.systems/files/talkgroup_ids.json|g" /opt/FDMR-Monitor/fdmr-mon.cfg wget -O /opt/FDMR-Monitor/html/favicon.ico https://adn.systems/files/ADN_37x18_01.ico
sed -i "s|PEER_URL.*|PEER_URL = https://adn.systems/files/peer_ids.json|g" /opt/FDMR-Monitor/fdmr-mon.cfg
sed -i "s/SUBSCRIBER_FILE =.*/SUBSCRIBER_FILE = subscriber_ids.json/g" /opt/FDMR-Monitor/fdmr-mon.cfg
#################
#logo
#wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1evvxLOh8uxKYYLoV0aORjDhFeLF42_S_' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1evvxLOh8uxKYYLoV0aORjDhFeLF42_S_" -O /opt/FDMR-Monitor/html/img/logo.png && rm -rf /tmp/cookies.txt &&
#favicon.ico
#wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1B-M7QNdf1gLVzbTn-Fi5GVPy6GTXcxJ-' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1B-M7QNdf1gLVzbTn-Fi5GVPy6GTXcxJ-" -O /opt/FDMR-Monitor/html/favicon.ico && rm -rf /tmp/cookies.txt &&
sudo sed '6 a <link rel="shortcut icon" href="/favicon.ico" />' -i /opt/FDMR-Monitor/html/index.php
# #
sudo cat > /opt/FDMR-Monitor/html/buttons.php <<- "EOF" sudo cat > /opt/FDMR-Monitor/html/buttons.php <<- "EOF"
<!-- HBMonitor buttons HTML code --> <!-- HBMonitor buttons HTML code -->
@ -841,13 +650,12 @@ sudo cat > /opt/FDMR-Monitor/html/buttons.php <<- "EOF"
</div> </div>
</div> </div>
<div class="dropdown"> <div class="dropdown">
<button class="dropbtn">FreeDMR</button> <button class="dropbtn">ADN-Systems</button>
<div class="dropdown-content"> <div class="dropdown-content">
&nbsp; &nbsp;
<a class="button" href="https://freedmr-lh.gb7fr.org.uk/?limit=100&recent=1"target="_blank">&nbsp;Global Info FreeDMR&nbsp;</a> <a class="button" href="https://adn.systems/"target="_blank">&nbsp;Global Info ADN Systems;</a>
<a class="button" href="http://www.freedmr.uk/index.php/freedmr-servers/"target="_blank">&nbsp;Info Server&nbsp;</a> <a class="button" href="https://adn.systems/servers-list/"target="_blank">&nbsp;Info Server&nbsp;</a>
<a class="button" href="http://www.freedmr.uk/index.php/world-wide-talk-groups/"target="_blank">&nbsp;World Wide Talk Groups&nbsp;</a> <a class="button" href="https://t.me/ADN_Systems"target="_blank">&nbsp;World Wide Telegram Groups&nbsp;</a>
<a class="button" href="http://www.freedmr.uk/freedmr/option-calculator-b.php"target="_blank">&nbsp;Static TG Calculator&nbsp;</a>
&nbsp; &nbsp;
</div> </div>
</div> </div>
@ -876,210 +684,11 @@ sudo cat > /opt/FDMR-Monitor/html/buttons.php <<- "EOF"
EOF EOF
# #
mkdir /var/www/fdmr/ mkdir /var/www/fdmr/
cp -r /opt/FDMR-Monitor/html/* /var/www/fdmr/ cp -r /opt/FDMR-Monitor/html/* /var/www/fdmr/
sudo chown www-data:www-data /var/www/fdmr/ -R sudo chown www-data:www-data /var/www/fdmr/ -R
cp /opt/FDMR-Monitor/utils/logrotate/fdmr_mon /etc/logrotate.d/ cp /opt/FDMR-Monitor/utils/logrotate/fdmr_mon /etc/logrotate.d/
cat > /opt/FDMR-Monitor/templates/main_table.html <<- "EOF"
<fieldset class="big">
<legend><b><font color="#000">&nbsp;.: Server Activity :.&nbsp;</font></b></legend>
{% if _table['MASTERS']|length >0 %}
<table style="table-layout:fixed;width:1100px; font: 10pt arial, sans-serif;margin-top:5px;margin-bottom:5px;" width=1100px>
<tr style="background-color:#265b8a;" "height:30px;font: 10pt arial, sans-serif;{{ themec }}">
<th>Systems M&P</th>
<th>Source</th>
<th>Destination</th>
</tr>
{% for _master in _table['MASTERS'] %}
{% for _client, _cdata in _table['MASTERS'][_master]['PEERS'].items() %}
{% if _cdata[1]['TS'] == True or _cdata[2]['TS'] == True %}
<tr style="background-color:#a1dcb5;">
{% if _cdata[1]['TRX'] == "RX" %}
<td style="font-weight:bold; padding-left: 20px; text-align:center;color:#464646;">M: {{_master}} </td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _cdata[1]['SUB']|safe }} [<span style="align-items: center;justify-content:center;font-size: 8pt;font-weight:600;color:brown;">TS {{ 1 if _cdata[1]['TS'] == True else 2 }}</span>]</td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#b5651d;">{{ _cdata[1]['DEST']|safe }}</td>
{% endif %}
{% if _cdata[2]['TRX'] == "RX" %}
<td style="font-weight:bold; padding-left: 20px; text-align:center;color:#464646"><b>M: {{_master}} </td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _cdata[2]['SUB']|safe }} [<span style="align-items: center;justify-content:center;font-size: 8pt;font-weight:600;color:brown;">TS {{ 1 if _cdata[1]['TS'] == True else 2 }}</span>]</td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#b5651d;">{{ _cdata[2]['DEST']|safe }}</td>
{% endif %}
</tr>
{% endif %}
{% endfor %}
{% endfor %}
{% else %}
<table style='width:1100px; font: 13pt arial, sans-serif; margin-top:8px;'>
<tr style='border:none; background-color:#f1f1f1;'>
<td style='border:none;height:60px;'><font color=brown><b><center>Waiting for Data from FreeDMR Server ...</center></b></td>
</tr>
</table>
{% endif %}
{% for _peer, _pdata in _table['PEERS'].items() %}
{% if _pdata[1]['TS'] == True or _pdata[2]['TS'] == True %}
<tr style="background-color:#f9f9f9f9;">
{% if _pdata[1]['TRX'] == "RX" %}
<td style="font-weight:bold; padding-left: 20px; text-align:center;color:#464646;">P: {{_peer}} </td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _pdata[1]['SUB']|safe }} [<span style="align-items: center;justify-content:center;font-size: 8pt;font-weight:600;color:brown;">TS {{ 1 if _pdata[1]['TS'] == True else 2 }}</span>]</td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#b5651d;">{{ _cdata[1]['DEST']|safe }}</td>
{% endif %}
{% if _pdata[2]['TRX'] == "RX" %}
<td style="font-weight:bold; padding-left: 20px; text-align:center;color:#464646;">P: {{_peer}} </td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#0d1a81;">{{ _pdata[2]['SUB']|safe }} [<span style="align-items: center;justify-content:center;font-size: 8pt;font-weight:600;color:brown;">TS {{ 1 if _pdata[1]['TS'] == True else 2 }}</span>]</td>
<td style="font: 9.5pt arial, sans-serif;font-weight: 600;color:#b5651d;">{{ _pdata[2]['DEST']|safe }}</td>
{% endif %}
</tr>
{% endif %}
{% endfor %}
<tr style="background-color:#f0f0f0;"><td colspan=3 height=5pt><hr style="height:1px;border:none;color:#f0f0f0;background-color:#f0f0f0;"></hr></td></tr>
{% if _table['OPENBRIDGES']|length >0 %}
<tr style="background-color:#265b8a;" "height:30px;width:1100px; font: 10pt arial, sans-serif;{{ themec }}">
<th>Systems OpenBridge</th>
<th colspan=2 '>Active Incoming Calls</th>
</tr>
{% for _openbridge in _table['OPENBRIDGES'] %}
{% set rx = namespace(value=0) %}
{% if _table['OPENBRIDGES'][_openbridge]['STREAMS']|length >0 %}
{% for entry in _table['OPENBRIDGES'][_openbridge]['STREAMS'] if _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][0]=='RX' %}
{% set rx.value=1 %}
{% endfor %}
{% if rx.value == 1 %}
<tr style="background-color:#de8184;">
<td style="font-weight:bold; padding-left: 20px; text-align:center;"> {{ _openbridge}} </td>
<td colspan=2 style="background-color:#a1dcb5; font: 9pt arial, sans-serif; font-weight: 600; color:#464646;">
{% for entry in _table['OPENBRIDGES'][_openbridge]['STREAMS'] if _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][0] == 'RX' %}[<span style="color:#008000;">{{ _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][0] }}</span>: <font color=#0065ff> {{ _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][1] }}</font> >> <font color=#b5651d> {{ _table['OPENBRIDGES'][_openbridge]['STREAMS'][entry][2] }}</font>]&nbsp; {% endfor %}
</td>
</tr>
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
</table>
</fieldset>
{% if _table['SETUP']['LASTHEARD'] == True %}
<fieldset class="big">
<legend><b>.: Lastheard :.</b></legend>
<table class="log">
<tr>
<th>Date</th>
<th>Time</th>
<th>Callsign (DMR-Id)</th>
<th>Name</th>
<th>TG#</th>
<th>TG Name</th>
<th>TX (s)</th>
<th>System</th>
</tr>
{% for itm in lastheard %}
<tr>
<td>{{ itm[0][:10] }}</td>
<td>{{ itm[0][11:] }}</td>
{% if not itm[7] %}
<td class="txt-464646"><b>{{ itm[6] }}</b></td>
<td></td>
{% else %}
<td><a target="_blank" href=https://qrz.com/db/{{itm[7][0]}}>{{ itm[7][0] }}</a></b><span class="fnt-7pt">&nbsp;({{ itm[6] }})</span></td>
<td <span style="color: #000000;"><b>{{ itm[7][1] }}</b></td>
{% endif %}
<td class="txt-b5651d"><b>{{ itm[4] }}</b></td>
<td <span style="color: #454545;"><b>{{ '' if not itm[5] else itm[5]|safe }}</b></td>
<td {{ 'class="bkgnd-1d1"'|safe if not itm[1] else '' }}>{{ 'DATA' if not itm[1] else itm[1]|int }}</td>
<td>{{ itm[3] }}</td>
</tr>
{% endfor %}
</table>
</fieldset>
{% endif %}
<fieldset class="big">
<legend><b>.: Connected to Server :.</b></legend>
<div class="conn2srv">
{% if _table['MASTERS']|length >0 %}
<tr style="background-color:#A7A2A2;"><td>
<br>
<div style="text-align:left;"><span style="color:#464646;font-weight:600;line-height:1.4;">&nbsp;&nbsp;LINKS:</span></div>
<div style="text-align:left;font:9.5pt arial, sans-serif;font-weight:bold;margin-left:25px; margin-right:25px;line-height:1.4;white-space:normal;">
{% for _master in _table['MASTERS'] %}
{% if _table['MASTERS'][_master]['PEERS']|length >0 %}
{% for _client, _cdata in _table['MASTERS'][_master]['PEERS'].items() %}
<span class="tooltip" style="border-bottom: 0px dotted white;">
<a style="border-bottom: 0px dotted white;font: 9.5pt arial,sans-serif;font-weight:bold;color:#0066ff;" target="_blank" href="http://www.qrz.com/db/{{_cdata['CALLSIGN']}}"><b>{{_cdata['CALLSIGN']}}</b></a>
<span class="tooltiptext" style="left:115%;top:-10px;">
<span style="font: 9pt arial,sans-serif;color:#3df8f8">
&nbsp;&nbsp;&nbsp;<b>DMR ID</b>: <b><font color=yellow>{{ _client }}</b></font><br>
{% if _cdata['RX_FREQ'] == 'N/A' and _cdata['TX_FREQ'] == 'N/A' %}
&nbsp;&nbsp;&nbsp;<b>Type: <font color=yellow>IP Network</font></b><br>
{% else %}
&nbsp;&nbsp;&nbsp;<b>Type: <font color=yellow>Radio</font></b> ({{ _cdata['SLOTS'] }})<br>
{% endif %}
&nbsp;&nbsp;&nbsp;<b>Hardware</b>: {{_cdata['PACKAGE_ID'] }}
<br>&nbsp;&nbsp;&nbsp;<b>Soft_Ver</b>: {{_cdata['SOFTWARE_ID'] }}
<br>&nbsp;&nbsp;&nbsp;<b>Info</b>: {{_cdata['LOCATION']}}
<br>&nbsp;&nbsp;&nbsp;<b>Master</b>: <font color=yellow>{{_master}}</font>
</span></span></span>&nbsp;
{% endfor %}
{% endif %}
{% endfor %}
</div>
{% endif %}
{% if _table['PEERS']|length >0 %}
<h4 class="tittle">PEERS:</h4>
<div class="hs-peers">
{% for _peer, _pdata in _table['PEERS'].items() %}
<div class="tooltip" style="border-bottom: 1px dotted white;{{'background-color:#98FB98; color:#464646;' if _table['PEERS'][_peer]['STATS']['CONNECTION'] == 'YES' else 'background-color:#ff0000; color:white;'}}"><b>&nbsp;&nbsp;{{_peer}}&nbsp;&nbsp;</b>
{% if _table['PEERS'][_peer]['STATS']['CONNECTION'] == 'YES' %}
<span class="tooltiptext c2s-pos2">Connected</span>
{% else %}
<span class="tooltiptext c2s-pos2"><b>Disconnected</b></span>
{% endif %}
</div>
{% endfor %}
</div>
{% endif %}
</div>
</fieldset>
EOF
# #
sed -i "s/1100/1200/g" /opt/FDMR-Monitor/templates/*.*
#sed -i "s/Copyright (c) 2016-.*/Copyright (c) <?php \$cdate=date(\"Y\"); if (\$cdate > \"2016\") {\$cdate=\"2016-\".date(\"Y\");} echo \$cdate; ?><br>/g" /var/www/fdmr/*.php
#sed -i "s/meta name=\"description.*/meta name=\"description\" content=\"Copyright (c) 2016-22.The Regents of the K0USY Group. All rights reserved. Version OA4DOA 2022 (v270422)\">/g" /var/www/fdmr/*.php
sed -i '166 s/hotpink/#ad02fd/g' /var/www/fdmr/css/styles.php
sed -i '217 s/color:white/color:black/' /var/www/fdmr/css/styles.php
sed -i "251d" /var/www/fdmr/css/styles.php
sed '250 a <?php echo THEME_COLOR."\\n";?>' -i /var/www/fdmr/css/styles.php
sed '21 a # For custom color, select: pro' -i /opt/FDMR-Monitor/fdmr-mon.cfg
sed '24 a COLOR_TEXT = #fff519' -i /opt/FDMR-Monitor/fdmr-mon.cfg
sed '25 a COLOR_1 = #000080' -i /opt/FDMR-Monitor/fdmr-mon.cfg
sed '26 a COLOR_2 = #193dff' -i /opt/FDMR-Monitor/fdmr-mon.cfg
#sed '27 a COLOR_BACKGROUND = 5a5958' -i /opt/FDMR-Monitor/fdmr-mon.cfg
sed '45 a $cd1 = strtolower($config["GLOBAL"]["COLOR_1"]);' -i /var/www/fdmr/include/config.php
sed '46 a $cd2 = strtolower($config["GLOBAL"]["COLOR_2"]);' -i /var/www/fdmr/include/config.php
sed '47 a $cd3 = strtolower($config["GLOBAL"]["COLOR_TEXT"]);' -i /var/www/fdmr/include/config.php
sed '48 a $cd3 = strtolower($config["GLOBAL"]["COLOR_TEXT"]);' -i /var/www/fdmr/include/config.php
sed '49 a $cd4 = strtolower($config["GLOBAL"]["COLOR_BACKGROUND"]);' -i /var/www/fdmr/include/config.php
sed '66 a } elseif ($theme == "pro") {' -i /var/www/fdmr/include/config.php
sed '67 a $tc = "background-image: linear-gradient(to bottom, $cd1 0%, $cd2 100%);color:$cd3;";' -i /var/www/fdmr/include/config.php
#sed -i "s/THEME_COLOR =.*/THEME_COLOR = pro/g" /opt/FDMR-Monitor/fdmr-mon.cfg
#sed -i "s/TGID_URL =.*/TGID_URL = https:\/\/freedmr.cymru\/talkgroups\/talkgroup_ids_json.php/g" /opt/FDMR-Monitor/fdmr-mon.cfg
if [ -f "mon.db" ] if [ -f "mon.db" ]
then then
rm mon.db rm mon.db
@ -1104,7 +713,6 @@ sudo sed -i "s/THEME_COLOR =.*/$variable2/g" /opt/FDMR-Monitor/fdmr-mon.cfg
sudo sed -i "s/COLOR_TEXT =.*/$variable3/g" /opt/FDMR-Monitor/fdmr-mon.cfg sudo sed -i "s/COLOR_TEXT =.*/$variable3/g" /opt/FDMR-Monitor/fdmr-mon.cfg
sudo sed -i "s/COLOR_1 =.*/$variable4/g" /opt/FDMR-Monitor/fdmr-mon.cfg sudo sed -i "s/COLOR_1 =.*/$variable4/g" /opt/FDMR-Monitor/fdmr-mon.cfg
sudo sed -i "s/COLOR_2 =.*/$variable5/g" /opt/FDMR-Monitor/fdmr-mon.cfg sudo sed -i "s/COLOR_2 =.*/$variable5/g" /opt/FDMR-Monitor/fdmr-mon.cfg
#sudo sed -i "s/All rights reserved.<br>.*/All rights reserved.<br>, <a href=https:\/\/gitlab.hacknix.net\/hacknix\/FreeDMR\/-\/wikis\/Home>FreeDMR<\/a> by <a href=\"http:\/\/www.qrz.com\/db\/G7RZU\"target=\"_blank\">G7RZU hacknix<\/a>, Script project: <a title=\"Raspbian Proyect by HP3ICC © <?php \$cdate=date(\"Y\"); if (\$cdate > \"2018\") {\$cdate=\"2018-\".date(\"Y\");} echo \$cdate; ?>\" target=\"_blank\" href=https:\/\/gitlab.com\/hp3icc\/fdmr\/>FDMR+<\/a><br>/g" /var/www/fdmr/*.php
chmod +x /opt/FDMR-Monitor/sysinfo/* chmod +x /opt/FDMR-Monitor/sysinfo/*
sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh
@ -1139,6 +747,11 @@ cronedit.sh '* */24 * * *' 'rm /etc/freedmr/hbmon/data/*' remove &&
cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor/data/*' add && cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor/data/*' add &&
cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor2/data/*' remove cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor2/data/*' remove
if [ -f "/etc/nginx/sites-enabled/freedmr" ]; then
mv /etc/nginx/sites-enabled/freedmr /etc/nginx/sites-enabled/adn
sudo systemctl restart nginx
fi
EOFB1 EOFB1
sudo chmod +x /opt/monitor-update.sh sudo chmod +x /opt/monitor-update.sh
######################################### FDMR-Monitor2 Update ############################################################### ######################################### FDMR-Monitor2 Update ###############################################################
@ -1149,7 +762,9 @@ if [[ $EUID -ne 0 ]]; then
echo "Este script debe ejecutarse como usuario ROOT" echo "Este script debe ejecutarse como usuario ROOT"
exit 1 exit 1
fi fi
if ! grep -q "Web-Dashboar-name: adn" "/opt/wdp" > /dev/null 2>&1; then
sed -i "s|Web-Dashboar-name:.*|Web-Dashboar-name: adn|g" /opt/wdp
fi
############## ##############
cd / cd /
sudo systemctl stop fdmr_mon.service sudo systemctl stop fdmr_mon.service
@ -1222,9 +837,7 @@ sudo git checkout Self_Service
chmod 777 /opt/FDMR-Monitor2/data chmod 777 /opt/FDMR-Monitor2/data
#sed -i '72d' /opt/FDMR-Monitor2/html/include/navbar.php sudo chmod 644 /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
#sed '69 a \ <option value="es">ES</option>' -i /opt/FDMR-Monitor2/html/include/navbar.php
sudo chmod 644 /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
sed -i "s|SUBSCRIBER_URL.*|SUBSCRIBER_URL = https://adn.systems/files/subscriber_ids.json|g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s|SUBSCRIBER_URL.*|SUBSCRIBER_URL = https://adn.systems/files/subscriber_ids.json|g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
sed -i "s|TGID_URL.*|TGID_URL = https://adn.systems/files/talkgroup_ids.json|g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s|TGID_URL.*|TGID_URL = https://adn.systems/files/talkgroup_ids.json|g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
sed -i "s|PEER_URL.*|PEER_URL = https://adn.systems/files/peer_ids.json|g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s|PEER_URL.*|PEER_URL = https://adn.systems/files/peer_ids.json|g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
@ -1241,17 +854,18 @@ sed -i "s/SUBSCRIBER_FILE =.*/SUBSCRIBER_FILE = subscriber_ids.json/g" /opt/FDMR
sed -i "s/FILES_PATH =.*/FILES_PATH = \/opt\/FDMR-Monitor2\/data/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg sed -i "s/FILES_PATH =.*/FILES_PATH = \/opt\/FDMR-Monitor2\/data/g" /opt/FDMR-Monitor2/fdmr-mon_SAMPLE.cfg
sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /opt/FDMR-Monitor2/html/config.php sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /opt/FDMR-Monitor2/html/config.php
variable2=$(date +'%Y' | tail -c 5) variable2=$(date +'%Y' | tail -c 5)
#sed -i "s/CS8ABG<\/a> Dash/FDMR-Monitor2<\/a> by <a href=\"http:\/\/www.qrz.com\/db\/CS8ABG\"target=\"_blank\">CS8ABG<\/a>, <a href=https:\/\/gitlab.hacknix.net\/hacknix\/FreeDMR\/-\/wikis\/Home>FreeDMR<\/a> by <a href=\"http:\/\/www.qrz.com\/db\/G7RZU\"target=\"_blank\">G7RZU hacknix<\/a>, Script project: <a title=\"Raspbian Proyect by HP3ICC © 2018-$variable2\" href=\"https:\/\/gitlab.com\/hp3icc\/fdmr\/\"target=\"_blank\">FDMR+<\/a>/g" /opt/FDMR-Monitor2/html/include/footer.php
sed -i "s/#fff/#d1d1d1/g" /opt/FDMR-Monitor2/html/plugins/adminlte/css/adminlte.min.css sed -i "s/#fff/#d1d1d1/g" /opt/FDMR-Monitor2/html/plugins/adminlte/css/adminlte.min.css
sed -i "s/f8f9fa/d0d0d0/g" /opt/FDMR-Monitor2/html/plugins/adminlte/css/adminlte.min.css sed -i "s/f8f9fa/d0d0d0/g" /opt/FDMR-Monitor2/html/plugins/adminlte/css/adminlte.min.css
sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /opt/FDMR-Monitor2/html/ssconfunc.php sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /opt/FDMR-Monitor2/html/ssconfunc.php
#sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /var/www/fdmr2/ssconfunc.php #sed -i "s/configFile =.*/configFile = '\/opt\/FDMR-Monitor2\/fdmr-mon.cfg';/g" /var/www/fdmr2/ssconfunc.php
wget -q --no-check-certificate -r 'https://docs.google.com/uc?export=download&id=1cWqClH0FUxV5d-rVnibI_-iCypFnTDb3' -O /opt/FDMR-Monitor2/html/img/bk.jpg && #wget -q --no-check-certificate -r 'https://docs.google.com/uc?export=download&id=1cWqClH0FUxV5d-rVnibI_-iCypFnTDb3' -O /opt/FDMR-Monitor2/html/img/bk.jpg &&
wget -q --no-check-certificate -r 'https://docs.google.com/uc?export=download&id=1vsviKjpZmL_mWVEW2UstNODGPl8-uNVo' -O /opt/flags.zip && #wget -q --no-check-certificate -r 'https://docs.google.com/uc?export=download&id=1vsviKjpZmL_mWVEW2UstNODGPl8-uNVo' -O /opt/flags.zip &&
#sudo unzip -o /opt/flags.zip -d /opt/FDMR-Monitor2/html/flags/ &&
sudo unzip -o /opt/flags.zip -d /opt/FDMR-Monitor2/html/flags/ && #rm /opt/flags.zip
rm /opt/flags.zip wget -O /opt/FDMR-Monitor2/html/img/logo.png https://adn.systems/files/logo1.png
wget -O /opt/FDMR-Monitor2/html/img/favicon.ico https://adn.systems/files/ADN_37x18_01.ico
wget -O /opt/FDMR-Monitor2/html/img/Logo_mini.png https://adn.systems/files/Logo_mini.png
sudo cp fdmr-mon_SAMPLE.cfg fdmr-mon.cfg sudo cp fdmr-mon_SAMPLE.cfg fdmr-mon.cfg
sudo chmod 644 fdmr-mon.cfg sudo chmod 644 fdmr-mon.cfg
@ -1344,6 +958,12 @@ cronedit.sh '*/2 * * * *' 'sh /etc/freedmr/hbmon/sysinfo/cpu.sh' remove &&
cronedit.sh '* */24 * * *' 'rm /etc/freedmr/hbmon/data/*' remove && cronedit.sh '* */24 * * *' 'rm /etc/freedmr/hbmon/data/*' remove &&
cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor/data/*' remove && cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor/data/*' remove &&
cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor2/data/*' add cronedit.sh '* */24 * * *' 'rm /opt/FDMR-Monitor2/data/*' add
if [ -f "/etc/nginx/sites-enabled/freedmr" ]; then
mv /etc/nginx/sites-enabled/freedmr /etc/nginx/sites-enabled/adn
sudo systemctl restart nginx
fi
EOFB2 EOFB2
sudo chmod +x /opt/monitor-update2.sh sudo chmod +x /opt/monitor-update2.sh
###################################################################################################################### ######################################################################################################################
@ -1380,7 +1000,7 @@ sudo chmod +x /opt/monitor-update.sh
sudo chmod +x /bin/menu* sudo chmod +x /bin/menu*
sudo chmod +x /opt/monitor-update2.sh sudo chmod +x /opt/monitor-update2.sh
if [ -d "/opt/FreeDMR/" ] if [ -d "/opt/ADN-DMR-Peer-Server/" ]
then then
menu-update menu-update
else else

Loading…
Cancel
Save

Powered by TurnKey Linux.