Update dvswitch.sh

This commit is contained in:
Esteban Mackay Q 2023-09-10 21:50:20 -05:00
parent c3998687ba
commit 4faa077c35
1 changed files with 2 additions and 14 deletions

View File

@ -2,9 +2,7 @@
############################################################################################################################# #############################################################################################################################
# dvswitch # dvswitch
############################################################################################################################# #############################################################################################################################
bash -c "$(curl -fsSL https://gitlab.com/hp3icc/Easy-DVSwitch/-/raw/main/install.sh)" bash -c "$(curl -fsSL https://gitlab.com/hp3icc/Easy-DVSwitch/-/raw/main/install.sh)"
sudo cat > /usr/local/dvs/dvs <<- "EOF" sudo cat > /usr/local/dvs/dvs <<- "EOF"
#!/bin/bash #!/bin/bash
@ -101,7 +99,6 @@ esac
EOF EOF
### ###
cd /tmp/ cd /tmp/
wget https://gitlab.com/hp3icc/DVSwitch-Mobile-TG-List/-/raw/main/lang.sh wget https://gitlab.com/hp3icc/DVSwitch-Mobile-TG-List/-/raw/main/lang.sh
sudo chmod +x lang.sh sudo chmod +x lang.sh
@ -112,7 +109,6 @@ sed -i "s/other1_name=.*/other1_name=FreeDMR/g" /var/lib/dvswitch/dvs/var.txt
sed -i "s/other1_address=.*/other1_address=freedmr-hp.ddns.net/g" /var/lib/dvswitch/dvs/var.txt sed -i "s/other1_address=.*/other1_address=freedmr-hp.ddns.net/g" /var/lib/dvswitch/dvs/var.txt
sed -i "s/other1_password=.*/other1_password=passw0rd/g" /var/lib/dvswitch/dvs/var.txt sed -i "s/other1_password=.*/other1_password=passw0rd/g" /var/lib/dvswitch/dvs/var.txt
sed -i "s/other1_port=.*/other1_port=62031/g" /var/lib/dvswitch/dvs/var.txt sed -i "s/other1_port=.*/other1_port=62031/g" /var/lib/dvswitch/dvs/var.txt
sed -i "s/other2_name=.*/other2_name=DMR-Central/g" /var/lib/dvswitch/dvs/var.txt sed -i "s/other2_name=.*/other2_name=DMR-Central/g" /var/lib/dvswitch/dvs/var.txt
sed -i "s/other2_address=.*/other2_address=dmr.pa7lim.nl/g" /var/lib/dvswitch/dvs/var.txt sed -i "s/other2_address=.*/other2_address=dmr.pa7lim.nl/g" /var/lib/dvswitch/dvs/var.txt
sed -i "s/other2_password=.*/other2_password=passw0rd/g" /var/lib/dvswitch/dvs/var.txt sed -i "s/other2_password=.*/other2_password=passw0rd/g" /var/lib/dvswitch/dvs/var.txt
@ -121,21 +117,18 @@ sed -i "s/42000/42500/g" /opt/YSFGateway/YSFGateway.ini
sed -i "s/42001/43001/g" /opt/YSFGateway/YSFGateway.ini sed -i "s/42001/43001/g" /opt/YSFGateway/YSFGateway.ini
sed -i "s/RptPort=3200/RptPort=3230/g" /opt/YSFGateway/YSFGateway.ini sed -i "s/RptPort=3200/RptPort=3230/g" /opt/YSFGateway/YSFGateway.ini
sed -i "s/LocalPort=4200/LocalPort=4230/g" /opt/YSFGateway/YSFGateway.ini sed -i "s/LocalPort=4200/LocalPort=4230/g" /opt/YSFGateway/YSFGateway.ini
if [ -d "/var/www/dvs" ] if [ -d "/var/www/dvs" ]
then then
rm -r /var/www/dvs rm -r /var/www/dvs
fi fi
mkdir /var/www/dvs
sudo mkdir /var/www/dvs mv /var/www/html/* /var/www/dvs/
sudo mv /var/www/html/* /var/www/dvs/
sed -i "s/<br>Dashboard based on Pi-Star Dashboard, © Andy Taylor.*/<br>Dashboard based on Pi-Star Dashboard, © Andy Taylor (MW0MWZ) and adapted to DVSwitch by SP2ONG<br> <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\/emq-TE1\/>Proyect: emq-TE1ws+<\/a><\/span><\/center>/" /var/www/dvs/index.php sed -i "s/<br>Dashboard based on Pi-Star Dashboard, © Andy Taylor.*/<br>Dashboard based on Pi-Star Dashboard, © Andy Taylor (MW0MWZ) and adapted to DVSwitch by SP2ONG<br> <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\/emq-TE1\/>Proyect: emq-TE1ws+<\/a><\/span><\/center>/" /var/www/dvs/index.php
sed -i 's/www\/html/www\/dvs/g' /usr/local/sbin/update-config.sh sed -i 's/www\/html/www\/dvs/g' /usr/local/sbin/update-config.sh
sed -i 's/www\/html/www\/dvs/g' /var/lib/dpkg/info/dvswitch* sed -i 's/www\/html/www\/dvs/g' /var/lib/dpkg/info/dvswitch*
sed -i 's/www\/html/www\/dvs/g' /var/www/dvs/include/* sed -i 's/www\/html/www\/dvs/g' /var/www/dvs/include/*
sed -i "s/Language=en_US/Language=es_ES/g" /opt/NXDNGateway/NXDNGateway.ini sed -i "s/Language=en_US/Language=es_ES/g" /opt/NXDNGateway/NXDNGateway.ini
sed -i "s/Language=en_US/Language=es_ES/g" /opt/P25Gateway/P25Gateway.ini sed -i "s/Language=en_US/Language=es_ES/g" /opt/P25Gateway/P25Gateway.ini
# #
sudo cat > /opt/MMDVM_Bridge/MMDVM_Bridge.ini <<- "EOF" sudo cat > /opt/MMDVM_Bridge/MMDVM_Bridge.ini <<- "EOF"
[General] [General]
@ -248,10 +241,8 @@ GatewayPort=14020
EOF EOF
#### ####
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl disable lighttpd.service sudo systemctl disable lighttpd.service
sudo systemctl stop lighttpd.service sudo systemctl stop lighttpd.service
sudo systemctl stop md380-emu.service sudo systemctl stop md380-emu.service
sudo systemctl stop analog_bridge.service sudo systemctl stop analog_bridge.service
sudo systemctl stop mmdvm_bridge.service sudo systemctl stop mmdvm_bridge.service
@ -263,7 +254,6 @@ sudo systemctl stop ircddbgatewayd.service
sudo systemctl stop p25parrot.service sudo systemctl stop p25parrot.service
sudo systemctl stop ysfparrot.service sudo systemctl stop ysfparrot.service
sudo systemctl stop nxdnparrot.service sudo systemctl stop nxdnparrot.service
sudo systemctl disable md380-emu.service sudo systemctl disable md380-emu.service
sudo systemctl disable analog_bridge.service sudo systemctl disable analog_bridge.service
sudo systemctl disable mmdvm_bridge.service sudo systemctl disable mmdvm_bridge.service
@ -275,7 +265,6 @@ sudo systemctl disable ircddbgatewayd.service
sudo systemctl disable p25parrot.service sudo systemctl disable p25parrot.service
sudo systemctl disable ysfparrot.service sudo systemctl disable ysfparrot.service
sudo systemctl disable nxdnparrot.service sudo systemctl disable nxdnparrot.service
rm /lib/systemd/system/analog_bridge.service rm /lib/systemd/system/analog_bridge.service
rm /lib/systemd/system/mmdvm_bridge.service rm /lib/systemd/system/mmdvm_bridge.service
rm /lib/systemd/system/ysfgateway.service rm /lib/systemd/system/ysfgateway.service
@ -299,7 +288,6 @@ wget https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/service/p25parrot.s
wget https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/service/quantar_bridge.service wget https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/service/quantar_bridge.service
wget https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/service/ircddbgatewayd.service wget https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/service/ircddbgatewayd.service
wget https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/service/md380-emu.service wget https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/service/md380-emu.service
rm /var/log/mmdvm/* rm /var/log/mmdvm/*
sudo cat > /lib/systemd/system/http.server-dvs.service <<- "EOF" sudo cat > /lib/systemd/system/http.server-dvs.service <<- "EOF"