mirror of https://gitlab.com/hp3icc/emq-TE1.git
Delete update directory
This commit is contained in:
parent
8b4d90daf5
commit
06c1d70a9f
|
|
@ -1,104 +0,0 @@
|
|||
#!/bin/bash
|
||||
sudo cat > /usr/local/dvs/dvs <<- "EOF"
|
||||
#!/bin/bash
|
||||
|
||||
#===================================
|
||||
SCRIPT_VERSION="Menu Script v.1.61"
|
||||
SCRIPT_AUTHOR="HL5KY"
|
||||
SCRIPT_DATE="11/06/2020"
|
||||
#===================================
|
||||
|
||||
source /var/lib/dvswitch/dvs/var.txt
|
||||
|
||||
if [ "$1" != "" ]; then
|
||||
case $1 in
|
||||
-v|-V|--version) echo "dvs "$SCRIPT_VERSION; exit 0 ;;
|
||||
-a|-A|--author) echo "dvs "$SCRIPT_AUTHOR; exit 0 ;;
|
||||
-d|-D|--date) echo "dvs "$SCRIPT_DATE; exit 0 ;;
|
||||
*) echo "Unknown parameter passed: $1"; exit 1 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
clear
|
||||
|
||||
# After upgrading, if [there is dvsm.basic] -> meaning setting is Advanced Macro Configuration
|
||||
if [ -e ${AB}dvsm.basic ]; then
|
||||
# if there is not character "Advanced" in dvsm.macro -> updated & upgraded and dvsm.macro is brand new
|
||||
if [[ -z `grep "Advanced" ${AB}dvsm.macro` ]]; then
|
||||
sudo \cp -f ${adv}dvsm.macro ${AB}dvsm.macro
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ -e /var/lib/dvswitch/dvs/var.old ]; then
|
||||
clear
|
||||
sudo \mv -f /var/lib/dvswitch/dvs/var.old /var/lib/dvswitch/dvs/var.txt
|
||||
source /var/lib/dvswitch/dvs/var.txt
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -e ${lan}language.txt ]; then
|
||||
clear
|
||||
sudo \cp -f ${lan}english.txt ${lan}language.txt
|
||||
source /var/lib/dvswitch/dvs/var.txt
|
||||
fi
|
||||
|
||||
|
||||
if [ "$startup_lan" != "73" ]; then
|
||||
|
||||
clear
|
||||
|
||||
update_var startup_lan 73
|
||||
|
||||
if (whiptail --title " Change Language Settings " --yesno "\
|
||||
|
||||
Do you want to change Language settings now ?
|
||||
|
||||
|
||||
You can do it later. The menu is under <Tools>
|
||||
" 12 70); then
|
||||
${DVS}language.sh; exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
OPTION=$(whiptail --title " $T010 " --menu "\
|
||||
$SCRIPT_VERSION\n
|
||||
\n
|
||||
" 14 110 6 \
|
||||
"01 $T011 " "$T012" \
|
||||
"02 $T013 " "$T014" \
|
||||
"03 $T015 " "$T016" \
|
||||
"04 $T023 " "$T024" \
|
||||
"05 $T017 " "$T018" \
|
||||
"06 $T019 " "$T020" 3>&1 1>&2 2>&3)
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
clear;
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case $OPTION in
|
||||
01\ *)sudo ${DVS}init_config.sh ;;
|
||||
02\ *)sudo ${DVS}adv_config_menu.sh ;;
|
||||
03\ *)sudo ${DVS}tools_menu.sh ;;
|
||||
04\ *)sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/service/dv-list-tg.sh)" ;;
|
||||
05\ *)sudo ${DVS}credits.sh ;;
|
||||
06\ *)exit 0
|
||||
esac
|
||||
|
||||
#exit 0
|
||||
|
||||
EOF
|
||||
###
|
||||
cd /tmp/
|
||||
wget https://raw.githubusercontent.com/hp3icc/DVSwitch-Mobile-TG-List/main/lang.sh
|
||||
chmod +x lang.sh
|
||||
sh lang.sh
|
||||
###
|
||||
|
||||
|
||||
|
|
@ -1,189 +0,0 @@
|
|||
variable=$(grep "SERVER_ID:" /opt/FreeDMR/config/FreeDMR.cfg | tail -c 5)
|
||||
sudo systemctl stop freedmr.service
|
||||
sudo systemctl stop fdmrparrot.service
|
||||
sudo systemctl stop proxy.service
|
||||
rm -r /opt/FreeDMR
|
||||
cd /opt
|
||||
git clone https://gitlab.hacknix.net/hacknix/FreeDMR.git
|
||||
cd FreeDMR
|
||||
mkdir config
|
||||
mkdir /var/log/FreeDMR
|
||||
chmod +x /opt/FreeDMR/install.sh
|
||||
./install.sh
|
||||
sudo cat > /opt/conf.txt <<- "EOF"
|
||||
|
||||
[LINKS]
|
||||
MODE: MASTER
|
||||
ENABLED: True
|
||||
REPEAT: True
|
||||
MAX_PEERS: 1
|
||||
EXPORT_AMBE: False
|
||||
IP:
|
||||
PORT: 54101
|
||||
PASSPHRASE: passw@rd
|
||||
GROUP_HANGTIME: 5
|
||||
USE_ACL: True
|
||||
REG_ACL: DENY:1
|
||||
SUB_ACL: DENY:1
|
||||
TGID_TS1_ACL: PERMIT:ALL
|
||||
TGID_TS2_ACL: PERMIT:ALL
|
||||
DEFAULT_UA_TIMER: 60
|
||||
SINGLE_MODE: True
|
||||
VOICE_IDENT: False
|
||||
TS1_STATIC:
|
||||
TS2_STATIC:
|
||||
DEFAULT_REFLECTOR: 0
|
||||
ANNOUNCEMENT_LANGUAGE: es_ES
|
||||
GENERATOR: 10
|
||||
ALLOW_UNREG_ID: True
|
||||
PROXY_CONTROL: False
|
||||
override_ident_tg:
|
||||
|
||||
[EchoTest]
|
||||
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
|
||||
##
|
||||
sudo sed -i 's/ALLOW_NULL_PASSPHRASE: True/ALLOW_NULL_PASSPHRASE: False/' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
|
||||
sudo sed -i 's/PASSPHRASE:/PASSPHRASE: passw0rd/' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
|
||||
sudo sed -i 's/ALLOW_NULL_PASSPHRASE: passw0rd False/ALLOW_NULL_PASSPHRASE: False/' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
|
||||
|
||||
cp /opt/FreeDMR/FreeDMR-SAMPLE.cfg /opt/
|
||||
cd /opt/
|
||||
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/ANNOUNCEMENT_LANGUAGE: en_GB/ANNOUNCEMENT_LANGUAGE: es_ES/' /opt/FreeDMR/config/FreeDMR.cfg
|
||||
sudo sed -i 's/VOICE_IDENT: True/VOICE_IDENT: False/' /opt/FreeDMR/config/FreeDMR.cfg
|
||||
sudo sed -i "s/SERVER_ID: 0000/SERVER_ID: $variable/g" /opt/FreeDMR/config/FreeDMR.cfg
|
||||
sudo sed -i 's/100/60/' /opt/FreeDMR/config/FreeDMR.cfg
|
||||
#sudo sed -i 's/54100/54060/' /opt/FreeDMR/hotspot_proxy_v2.py
|
||||
#sudo sed -i 's/REPORT_CLIENTS: 127.0.0.1/REPORT_CLIENTS: */' /opt/FreeDMR/config/FreeDMR.cfg
|
||||
sudo sed -i "s/TGID_URL:/#TGID_URL:/g" /opt/FreeDMR/config/FreeDMR.cfg
|
||||
sed '37 a TGID_URL: https://freedmr.cymru/talkgroups/talkgroup_ids_json.php' -i /opt/FreeDMR/config/FreeDMR.cfg
|
||||
sed '43 a TOPO_FILE: topography.json' -i /opt/FreeDMR/config/FreeDMR.cfg
|
||||
rm /opt/conf.txt
|
||||
#rm /opt/obp.txt
|
||||
cd /opt/FreeDMR/
|
||||
mv loro.cfg /opt/FreeDMR/playback.cfg
|
||||
sudo sed -i 's/54915/49061/' /opt/FreeDMR/playback.cfg
|
||||
######
|
||||
cat /opt/rules.txt >> /opt/FreeDMR/config/rules.py
|
||||
sed '14 a VALIDATE_SERVER_IDS: True' -i /opt/FreeDMR/config/FreeDMR.cfg
|
||||
sed '105 a override_ident_tg:' -i /opt/FreeDMR/config/FreeDMR.cfg
|
||||
sudo rm /opt/FreeDMR/hotspot_proxy_v2.py
|
||||
#sudo rm /opt/FreeDMR/proxy_db.*
|
||||
#cp /opt/FDMR-Monitor/proxy/* /opt/FreeDMR/ -r
|
||||
cp /opt/FDMR-Monitor/proxy/hotspot_proxy_v2.py /opt/FreeDMR/hotspot_proxy_v2.py -r
|
||||
cp /opt/FDMR-Monitor/proxy/proxy.cfg /opt/FreeDMR/proxy.cfg -r
|
||||
cp /opt/FDMR-Monitor/proxy/proxy_db.py /opt/FreeDMR/proxy_db.py -r
|
||||
|
||||
#####################
|
||||
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||
sudo sed -i "s/54100/54060/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||
sudo sed -i "s/\/freedmr.cfg/\/config\/FreeDMR.cfg/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/proxy_db.py
|
||||
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/proxy_db.py
|
||||
#
|
||||
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/proxy.cfg
|
||||
sudo sed -i "s/54100/54060/g" /opt/FreeDMR/proxy.cfg
|
||||
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/proxy.cfg
|
||||
#########
|
||||
sudo cat > /lib/systemd/system/freedmr.service <<- "EOF"
|
||||
[Unit]
|
||||
Description=FreeDmr
|
||||
After=multi-user.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
StandardOutput=null
|
||||
ExecStartPre=/bin/sh -c 'until ping -c1 noip.com; do sleep 1; done;'
|
||||
ExecStart=/usr/bin/python3 /opt/FreeDMR/bridge_master.py -c /opt/FreeDMR/config/FreeDMR.cfg -r /opt/FreeDMR/config/rules.py
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
EOF
|
||||
###
|
||||
#
|
||||
sudo cat > /lib/systemd/system/proxy.service <<- "EOF"
|
||||
[Unit]
|
||||
Description= Proxy Service
|
||||
|
||||
After=multi-user.target
|
||||
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Type=simple
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
StandardOutput=null
|
||||
ExecStartPre=/bin/sh -c 'until ping -c1 noip.com; do sleep 1; done;'
|
||||
#WorkingDirectory=/opt/FreeDMR
|
||||
#ExecStart=/usr/bin/python3 /opt/FreeDMR/hotspot_proxy_v2.py
|
||||
ExecStart=/usr/bin/python3 /opt/FreeDMR/hotspot_proxy_v2.py -c /opt/FreeDMR/proxy.cfg
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
EOF
|
||||
##
|
||||
sudo chmod +x /opt/FreeDMR/*.py
|
||||
sudo chmod +x /opt/FreeDMR/config/*.py
|
||||
rm /opt/FreeDMR-SAMPLE.cfg
|
||||
sudo chmod +x /opt/extra-1.sh
|
||||
sudo sh /opt/extra-1.sh
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl start proxy.service
|
||||
sudo systemctl start freedmr.service
|
||||
sudo systemctl start fdmrparrot.service
|
||||
sudo systemctl restart fdmr_mon.service
|
||||
# ExecStart=/usr/bin/python3 /opt/FreeDMR/bridge_master.py -c /opt/FreeDMR/config/FreeDMR.cfg -r /opt/FreeDMR/config/rules.py
|
||||
|
||||
# ExecStart=/usr/bin/python3 /opt/FreeDMR/playback.py -c /opt/FreeDMR/playback.cfg
|
||||
|
||||
#
|
||||
|
|
@ -1,199 +0,0 @@
|
|||
#!/bin/sh
|
||||
sudo systemctl stop apache2
|
||||
sudo systemctl disable apache2
|
||||
sudo systemctl stop fdmr_mon.service
|
||||
sudo systemctl stop http.server-fmr.service
|
||||
rm -r /opt/FDMR-Monitor/
|
||||
cd /opt
|
||||
#sudo git clone https://github.com/yuvelq/FDMR-Monitor.git
|
||||
sudo git clone https://github.com/hp3icc/FDMR-Monitor.git
|
||||
cd FDMR-Monitor
|
||||
#git checkout Self_service_dev
|
||||
sudo chmod +x install.sh
|
||||
sudo ./install.sh
|
||||
sudo cp fdmr-mon_SAMPLE.cfg fdmr-mon.cfg
|
||||
sudo sed -i 's/RELOAD_TIME = 15/RELOAD_TIME = 1/' /opt/FDMR-Monitor/fdmr-mon.cfg
|
||||
sudo chmod 644 fdmr-mon.cfg
|
||||
sudo cp utils/logrotate/fdmr_mon /etc/logrotate.d/
|
||||
sudo cp utils/systemd/fdmr_mon.service /lib/systemd/system/
|
||||
#sudo sed -i 's/FREQUENCY = 10/FREQUENCY = 60/' /opt/FDMR-Monitor/fdmr-mon.cfg
|
||||
#
|
||||
sed '30 a <!--' -i /opt/FDMR-Monitor/html/sysinfo.php
|
||||
sed '32 a -->' -i /opt/FDMR-Monitor/html/sysinfo.php
|
||||
####
|
||||
sudo sed -i 's/localhost_2-day.png/localhost_1-day.png/' /opt/FDMR-Monitor/html/sysinfo.php
|
||||
cd /opt/FDMR-Monitor/sysinfo/
|
||||
sudo sed -i 's/var\/www\/html/opt\/FDMR-Monitor\/html/' cpu.sh
|
||||
sudo sed -i 's/var\/www\/html/opt\/FDMR-Monitor\/html/' graph.sh
|
||||
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/graph.sh
|
||||
sudo chmod +x /opt/FDMR-Monitor/sysinfo/rrd-db.sh
|
||||
sudo sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh
|
||||
sudo chmod +x /opt/FDMR-Monitor/updateTGIDS.sh
|
||||
#
|
||||
sudo cat > /opt/FDMR-Monitor/html/buttons.php <<- "EOF"
|
||||
<!-- HBMonitor buttons HTML code -->
|
||||
<a class="button" href="index.php"> Home </a>
|
||||
<!--
|
||||
|
||||
<div class="dropdown">
|
||||
@hp3icc
|
||||
hp3icc /
|
||||
emq-TE1ws
|
||||
Public
|
||||
|
||||
Code
|
||||
Issues 1
|
||||
Pull requests
|
||||
Actions
|
||||
Projects
|
||||
Wiki
|
||||
Security
|
||||
Insights
|
||||
|
||||
Settings
|
||||
|
||||
emq-TE1ws/
|
||||
in
|
||||
main
|
||||
|
||||
1
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
2
|
||||
|
||||
sudo systemctl stop fdmr_mon.service
|
||||
|
||||
3
|
||||
|
||||
rm -r /opt/FDMR-Monitor/
|
||||
|
||||
4
|
||||
|
||||
cd /opt
|
||||
|
||||
5
|
||||
|
||||
sudo git clone https://github.com/yuvelq/FDMR-Monitor
|
||||
|
||||
6
|
||||
|
||||
cd FDMR-Monitor
|
||||
|
||||
7
|
||||
|
||||
sudo chmod +x install.sh
|
||||
|
||||
8
|
||||
|
||||
sudo ./install.sh
|
||||
|
||||
9
|
||||
|
||||
sudo cp fdmr-mon_SAMPLE.cfg fdmr-mon.cfg
|
||||
<button class="dropbtn"> Admin Area </button>
|
||||
<div class="dropdown-content">
|
||||
<a href="masters.php"> Masters </a>
|
||||
<a href="peers.php"> Peers </a>
|
||||
<a href="opb.php"> OpenBridge </a>
|
||||
<a href="bridges.php"> Bridges </a>
|
||||
<a href="moni.php"> Monitor </a>
|
||||
<a href="sinfo.php"> System Info </a>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">Links</button>
|
||||
<div class="dropdown-content">
|
||||
|
||||
<a class="button" href="linkedsys.php"> Linked Systems </a>
|
||||
|
||||
<a class="button" href="opb.php"> OpenBridge </a>
|
||||
|
||||
<a class="button" href="statictg.php"> Static TG </a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">Local Server</button>
|
||||
<div class="dropdown-content">
|
||||
<a class="button" href="moni.php"> Monitor </a>
|
||||
|
||||
<a class="button" href="sysinfo.php"> System Info </a>
|
||||
|
||||
<a class="button" href="log.php"> Lastheard </a>
|
||||
|
||||
<a class="button" href="tgcount.php"> TG Count </a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">FreeDMR</button>
|
||||
<div class="dropdown-content">
|
||||
|
||||
<a class="button" href="http://www.freedmr.uk/index.php/why-use-freedmr/"target="_blank"> Info FreeDMR </a>
|
||||
|
||||
<a class="button" href="http://www.freedmr.uk/index.php/freedmr-servers/"target="_blank"> Info Server </a>
|
||||
|
||||
<a class="button" href="http://repeater.uk.freedmr.link/status/server_status.php"target="_blank"> Status Server </a>
|
||||
|
||||
<a class="button" href="http://www.freedmr.uk/freedmr/option-calculator-b.php"target="_blank"> Static TG Calculator </a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
|
||||
<a class="button" href="bridges.php"> Bridges </a>
|
||||
-->
|
||||
<!-- Own buttons HTML code -->
|
||||
<!-- Example of buttons dropdown HTML code -->
|
||||
<!--
|
||||
<p></p>
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">Admin Area</button>
|
||||
<div class="dropdown-content">
|
||||
<a href="masters.php">Master&Peer</a>
|
||||
<a href="opb.php">OpenBridge</a>
|
||||
<a href="moni.php">Monitor</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">Reflectors</button>
|
||||
<div class="dropdown-content">
|
||||
<a target='_blank' href="#">YSF Reflector</a>
|
||||
<a target='_blank' href="#">XLX950</a>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
EOF
|
||||
|
||||
#
|
||||
sudo rm /opt/FreeDMR/hotspot_proxy_v2.py
|
||||
sudo rm /opt/FreeDMR/proxy_db.*
|
||||
cd /opt/FreeDMR/
|
||||
wget https://gitlab.hacknix.net/hacknix/FreeDMR/-/raw/master/hotspot_proxy_v2.py
|
||||
sudo sed -i "s/54100/54060/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||
chmod +x hotspot_proxy_v2.py
|
||||
#
|
||||
sudo rm /opt/FDMR-Monitor/*.json
|
||||
sudo systemctl daemon-reload
|
||||
sudo rm /opt/FDMR-Monitor/sysinfo/*.rrd
|
||||
sudo sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh
|
||||
sudo systemctl start http.server-fmr.service
|
||||
sudo systemctl enable http.server-fmr.service
|
||||
sudo chmod +x /opt/extra-2.sh
|
||||
sudo sh /opt/extra-2.sh
|
||||
|
||||
sudo rm mon.db
|
||||
sudo python3 mon_db.py
|
||||
|
||||
sudo systemctl restart fdmr_mon.service
|
||||
sudo systemctl restart proxy.service
|
||||
|
|
@ -1 +0,0 @@
|
|||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/update/update.sh)"
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
#!/bin/sh
|
||||
sudo systemctl stop fdmr_mon.service
|
||||
sudo systemctl stop http.server-fmr.service
|
||||
sudo systemctl disable http.server-fmr.service
|
||||
sudo rm -r /opt/FDMR-Monitor/
|
||||
#
|
||||
systemctl restart apache2
|
||||
sudo systemctl enable apache2
|
||||
#
|
||||
cd /opt
|
||||
sudo git clone https://github.com/yuvelq/FDMR-Monitor.git
|
||||
cd FDMR-Monitor
|
||||
sudo git checkout Self_Service
|
||||
sudo chmod +x install.sh
|
||||
#sudo ./install.sh
|
||||
#sudo cp fdmr-mon_SAMPLE.cfg fdmr-mon.cfg
|
||||
sudo sed -i 's/RELOAD_TIME = 15/RELOAD_TIME = 1/' /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||
#sudo cp utils/logrotate/fdmr_mon /etc/logrotate.d/
|
||||
rm /etc/logrotate.d/fdmr_mon
|
||||
rm /lib/systemd/system/fdmr_mon.service
|
||||
#sudo cp utils/systemd/fdmr_mon.service /lib/systemd/system/
|
||||
sudo sed -i 's/FREQUENCY = 10/FREQUENCY = 60/' /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
|
||||
####
|
||||
sudo sed -i 's/localhost_2-day.png/localhost_1-day.png/' /opt/FDMR-Monitor/html/sysinfo.php
|
||||
cd /var/www/html/sysinfo/
|
||||
#sudo sed -i 's/var\/www\/html/opt\/FDMR-Monitor\/html/' cpu.sh
|
||||
#sudo sed -i 's/var\/www\/html/opt\/FDMR-Monitor\/html/' graph.sh
|
||||
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/graph.sh
|
||||
sudo chmod +x /opt/FDMR-Monitor/sysinfo/rrd-db.sh
|
||||
|
||||
#sudo chmod +x /opt/FDMR-Monitor/updateTGIDS.sh
|
||||
#
|
||||
sudo cat > /opt/FDMR-Monitor/html/buttons.php <<- "EOF"
|
||||
<!-- HBMonitor buttons HTML code -->
|
||||
<a class="button" href="index.php">Home</a>
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">Links</button>
|
||||
<div class="dropdown-content">
|
||||
|
||||
<a class="button" href="linkedsys.php">Linked Systems</a>
|
||||
|
||||
<a class="button" href="statictg.php">Static TG</a>
|
||||
|
||||
<a class="button" href="opb.php">OpenBridge</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">Self Service</button>
|
||||
<div class="dropdown-content">
|
||||
<?php if(!PRIVATE_NETWORK){echo '<a class="button" href="selfservice.php">SelfService</a>';}?>
|
||||
<a class="button" href="login.php">Login</a>
|
||||
<?php
|
||||
if(isset($_SESSION["auth"], $_SESSION["callsign"], $_SESSION["h_psswd"]) and $_SESSION["auth"]){
|
||||
echo '<a class="button" href="devices.php">Devices</a>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">Local Server</button>
|
||||
<div class="dropdown-content">
|
||||
<a class="button" href="moni.php"> Monitor </a>
|
||||
|
||||
<a class="button" href="sysinfo.php"> System Info </a>
|
||||
|
||||
<a class="button" href="log.php"> Lastheard </a>
|
||||
|
||||
<a class="button" href="tgcount.php"> TG Count </a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">FreeDMR</button>
|
||||
<div class="dropdown-content">
|
||||
|
||||
<a class="button" href="http://www.freedmr.uk/index.php/why-use-freedmr/"target="_blank"> Info FreeDMR </a>
|
||||
|
||||
<a class="button" href="http://www.freedmr.uk/index.php/freedmr-servers/"target="_blank"> Info Server </a>
|
||||
|
||||
<a class="button" href="http://repeater.uk.freedmr.link/status/server_status.php"target="_blank"> Status Server </a>
|
||||
|
||||
<a class="button" href="http://www.freedmr.uk/index.php/world-wide-talk-groups/"target="_blank"> World Wide Talk Groups </a>
|
||||
|
||||
<a class="button" href="http://www.freedmr.uk/freedmr/option-calculator-b.php"target="_blank"> Static TG Calculator </a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--
|
||||
<a class="button" href="bridges.php">Bridges</a>
|
||||
-->
|
||||
|
||||
<!-- Example of buttons dropdown HTML code -->
|
||||
<!--
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">Admin Area</button>
|
||||
<div class="dropdown-content">
|
||||
<a href="masters.php">Master&Peer</a>
|
||||
<a href="opb.php">OpenBridge</a>
|
||||
<a href="moni.php">Monitor</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">Reflectors</button>
|
||||
<div class="dropdown-content">
|
||||
<a target='_blank' href="#">YSF Reflector</a>
|
||||
<a target='_blank' href="#">XLX950</a>
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
#
|
||||
|
||||
#sudo sed -i "s/opt\/FreeDMR\/freedmr.cfg/opt\/FreeDMR\/config\/FreeDMR.cfg/g" /opt/FDMR-Monitor/install.sh
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
sudo chmod +x /opt/extra-2.sh
|
||||
sh /opt/extra-2.sh
|
||||
sudo sed -i "s/root/emqte1/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||
sudo sed -i "s/test/selfcare/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/TGID_URL =/#TGID_URL =/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||
sed '63 a TGID_URL = https://freedmr.cymru/talkgroups/talkgroup_ids_json.php' -i /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||
sed '64 a #TGID_URL = https://freedmr.cymru/talkgroups/talkgroup_ids_flags_json.php' -i /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||
sudo rm /opt/FDMR-Monitor/data/*
|
||||
cd /opt/FDMR-Monitor/
|
||||
sudo rm /opt/FDMR-Monitor/install.sh
|
||||
wget https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/self/install.sh
|
||||
chmod +x /opt/FDMR-Monitor/install.sh
|
||||
#
|
||||
sh /opt/FDMR-Monitor/install.sh
|
||||
sudo sh /opt/extra-2.sh
|
||||
#####################
|
||||
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||
sudo sed -i "s/54100/54060/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||
sudo sed -i "s/\/freedmr.cfg/\/config\/FreeDMR.cfg/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/proxy_db.py
|
||||
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/proxy_db.py
|
||||
#
|
||||
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/proxy.cfg
|
||||
sudo sed -i "s/54100/54060/g" /opt/FreeDMR/proxy.cfg
|
||||
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/proxy.cfg
|
||||
#################
|
||||
#sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh
|
||||
#rm /opt/FDMR-Monitor/sysinfo/*.rrd
|
||||
sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh
|
||||
#sed '33 a <!--' -i /var/www/html/sysinfo.php
|
||||
#sed '35 a -->' -i /var/www/html/sysinfo.php
|
||||
|
||||
cp -r /opt/FDMR-Monitor/sysinfo/ /var/www/html/sysinfo/
|
||||
|
||||
#sudo rm mon.db
|
||||
#sudo python3 mon_db.py
|
||||
sudo systemctl start proxy.service
|
||||
sudo systemctl start fdmr_mon.service
|
||||
sudo systemctl enable fdmr_mon.service
|
||||
151
update/update.sh
151
update/update.sh
|
|
@ -1,151 +0,0 @@
|
|||
variable22=$(grep "EMQ-VER:" /opt/emq-ver | tail -c 5)
|
||||
echo 123> /bin/menu-update
|
||||
sudo rm /bin/menu-update
|
||||
sudo cat > /bin/menu-update <<- "EOF"
|
||||
#!/bin/bash
|
||||
while : ; do
|
||||
choix=$(whiptail --title "Raspbian Proyect HP3ICC Menu FreeDMR" --menu "Nota Importante: solo actualice aplicaciones que esten en uso, al finalizar la actualizacion la aplicacion se reiniciara, tenga pleno dominio de las configuraciones de cada aplicacion, antes de actualizar.
|
||||
" 17 50 5 \
|
||||
1 " Update FDMR-Monitor OA4DOA " \
|
||||
2 " Update FreeDMR " \
|
||||
3 " ADVANCE UPGRADE & INSTALL " \
|
||||
4 " Menu Principal " 3>&1 1>&2 2>&3)
|
||||
exitstatus=$?
|
||||
#on recupere ce choix
|
||||
#exitstatus=$?
|
||||
if [ $exitstatus = 0 ]; then
|
||||
echo "Your chosen option:" $choix
|
||||
else
|
||||
echo "You chose cancel."; break;
|
||||
fi
|
||||
# case : action en fonction du choix
|
||||
case $choix in
|
||||
1)
|
||||
menu-up-hbmon2 ;;
|
||||
2)
|
||||
menu-up-fdm ;;
|
||||
3)
|
||||
menu-update2 ;;
|
||||
4)
|
||||
break;
|
||||
esac
|
||||
done
|
||||
exit 0
|
||||
|
||||
EOF
|
||||
####
|
||||
sudo cat > /bin/menu-update2 <<- "EOF"
|
||||
#!/bin/bash
|
||||
while : ; do
|
||||
choix=$(whiptail --title "Raspbian Proyect HP3ICC Menu FreeDMR" --menu "Nota Importante: solo actualice aplicaciones que esten en uso, al finalizar la actualizacion la aplicacion se reiniciara, tenga pleno dominio de las configuraciones de cada aplicacion, antes de actualizar.
|
||||
" 21 50 8 \
|
||||
1 " UPGRADE to Reuter AP Mode " \
|
||||
2 " install LAMP " \
|
||||
3 " install DVSMU " \
|
||||
4 " install DVSWitch TG List select " \
|
||||
5 " Menu Principal " 3>&1 1>&2 2>&3)
|
||||
exitstatus=$?
|
||||
#on recupere ce choix
|
||||
#exitstatus=$?
|
||||
if [ $exitstatus = 0 ]; then
|
||||
echo "Your chosen option:" $choix
|
||||
else
|
||||
echo "You chose cancel."; break;
|
||||
fi
|
||||
# case : action en fonction du choix
|
||||
case $choix in
|
||||
1)
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/te1ap.sh)" ;;
|
||||
2)
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/lamp.sh)" ;;
|
||||
3)
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/DVSMU/main/emq-dvsmu.sh)" ;;
|
||||
4)
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/dvsTGupdate.sh)" ;;
|
||||
5)
|
||||
break;
|
||||
esac
|
||||
done
|
||||
exit 0
|
||||
|
||||
EOF
|
||||
#
|
||||
sudo cat > /bin/menu-up-fdm <<- "EOF"
|
||||
#!/bin/bash
|
||||
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.
|
||||
" 18 55 5 \
|
||||
1 " List OBP " \
|
||||
2 " List Rules " \
|
||||
3 " shell extra " \
|
||||
4 " Iniciar Actualizacion FreeDMR " \
|
||||
5 " Menu Principal " 3>&1 1>&2 2>&3)
|
||||
exitstatus=$?
|
||||
#on recupere ce choix
|
||||
#exitstatus=$?
|
||||
if [ $exitstatus = 0 ]; then
|
||||
echo "Your chosen option:" $choix
|
||||
else
|
||||
echo "You chose cancel."; break;
|
||||
fi
|
||||
# case : action en fonction du choix
|
||||
case $choix in
|
||||
1)
|
||||
sudo nano /opt/obp.txt ;;
|
||||
2)
|
||||
sudo nano /opt/rules.txt ;;
|
||||
3)
|
||||
sudo nano /opt/extra-1.sh && chmod +x /opt/extra* ;;
|
||||
4)
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/fdmr-update.sh)" ;;
|
||||
5)
|
||||
break;
|
||||
esac
|
||||
done
|
||||
exit 0
|
||||
|
||||
|
||||
EOF
|
||||
#
|
||||
sudo cat > /bin/menu-up-hbmon2 <<- "EOF"
|
||||
#!/bin/bash
|
||||
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.
|
||||
" 17 50 4 \
|
||||
1 " shell extra " \
|
||||
2 " Iniciar Actualizacion HBMon2 " \
|
||||
3 " Menu Principal " 3>&1 1>&2 2>&3)
|
||||
exitstatus=$?
|
||||
#on recupere ce choix
|
||||
#exitstatus=$?
|
||||
if [ $exitstatus = 0 ]; then
|
||||
echo "Your chosen option:" $choix
|
||||
else
|
||||
echo "You chose cancel."; break;
|
||||
fi
|
||||
# case : action en fonction du choix
|
||||
case $choix in
|
||||
1)
|
||||
sudo nano /opt/extra-2.sh && chmod +x /opt/extra* ;;
|
||||
2)
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/selfservice-update.sh)" ;;
|
||||
3)
|
||||
break;
|
||||
esac
|
||||
done
|
||||
exit 0
|
||||
|
||||
|
||||
EOF
|
||||
##########
|
||||
#sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/menu.sh)"
|
||||
#sudo sed -i "s/R00ab/$variable22/g" /bin/menu
|
||||
#####
|
||||
cp /bin/menu /bin/MENU
|
||||
chmod +x /bin/menu*
|
||||
chmod +x /bin/MENU
|
||||
chmod +x /tmp/menu-update
|
||||
|
||||
#
|
||||
|
||||
menu-update
|
||||
Loading…
Reference in New Issue