This commit is contained in:
Esteban Mackay Q 2023-12-11 01:27:38 -05:00
parent 72c92a5379
commit 78578a620a
2 changed files with 0 additions and 35 deletions

View File

@ -2,10 +2,8 @@
#################################################################################################################################
# i2c
#################################################################################################################################
cd /boot
sudo sed -i 's/console=serial0,115200 //' /boot/cmdline.txt
sudo systemctl stop serial-getty@ttyAMA0.service
sudo systemctl stop bluetooth.service
sudo systemctl disable serial-getty@ttyAMA0.service
@ -61,7 +59,6 @@ if [ -d "/opt/MMDVMHost" ]
then
rm -r /opt/MMDVMHost
fi
cd /opt
git clone https://github.com/g4klx/MMDVMHost.git
#git clone https://github.com/hp3icc/MMDVMHost.git
@ -515,24 +512,7 @@ EOF
#################################################################################################################################
# MMDVMHost - Dashboard WebSocket
#################################################################################################################################
#web
if [ -f "/opt/wdp5" ]
then
echo "found file"
else
sudo cat > /opt/wdp5 <<- "EOFX"
###########################################
# Select number port, MMDVMHost Dashboard #
###########################################
Web-Dashboar-Port: 80
EOFX
fi
#apps=("python3-pip" "python3-websockets" "python3-gpiozero" "python3-psutil" "python3-serial")
sudo adduser --system --no-create-home --group mmdvm
if [ -d "/opt/MMDVMHost-Websocketboard" ]
@ -541,21 +521,17 @@ then
#echo "found file"
fi
cd /opt/
git clone --recurse-submodules -j8 https://github.com/dg9vh/MMDVMHost-Websocketboard
sudo chown -R mmdvm:mmdvm /opt/MMDVMHost-Websocketboard
#
sudo sed '264 a <!--' -i /opt/MMDVMHost-Websocketboard/html/index.html
sudo sed '266 a -->' -i /opt/MMDVMHost-Websocketboard/html/index.html
sudo sed -i "s/\`Custom-Headline-Text\`/\`Websocket-Based\`/g" /opt/MMDVMHost-Websocketboard/html/js/config.js
sudo sed -i "s/about = 1/about = 0/g" /opt/MMDVMHost-Websocketboard/html/js/config.js
sudo sed -i "s/currtx = 1/currtx = 0/g" /opt/MMDVMHost-Websocketboard/html/js/config.js
sudo sed -i "s/qso = 1/qso = 0/g" /opt/MMDVMHost-Websocketboard/html/js/config.js
sudo sed -i "s/dapnet = 1/dapnet = 0/g" /opt/MMDVMHost-Websocketboard/html/js/config.js
sudo sed -i "s/DGIdGateway/YSFGateway/g" /opt/MMDVMHost-Websocketboard/logtailer.ini
sudo sed -i "s/BinaryName5/#BinaryName5/g" /opt/MMDVMHost-Websocketboard/logtailer.ini
sudo sed -i 's/Logdir=\/mnt\/ramdisk/Logdir=\/var\/log\/mmdvmh/' /opt/MMDVMHost-Websocketboard/logtailer.ini
@ -577,7 +553,6 @@ sudo sed -i 's/<span class="navbar-brand float:right">Websocket-Based<\/span>/<s
sudo sed -i 's/<a class="navbar-brand" href="#">MMDVM-Dashboard by DG9VH<\/a>/<h6 style="text-align: center;"><span style="color: #808080;"><a style="color: #808080;" href="https:\/\/github.com\/hp3icc\/emq-TE1ws\/" target="_blank">emq-te1ws Raspbian Proyect by hp3icc<\/a> copyright 2018-YK00<\/span><\/h6>/g' /opt/MMDVMHost-Websocketboard/html/index.html
variable2=$(date +'%Y' | tail -c 5)
sudo sed -i "s/YK00/$variable2/g" /opt/MMDVMHost-Websocketboard/html/index.html
#############################
sudo cat > /lib/systemd/system/logtailer-mmdvmh.service <<- "EOF"
[Unit]

View File

@ -1,17 +1,12 @@
#!/bin/bash
# Verificar si el usuario tiene permisos de root
if [[ $EUID -ne 0 ]]; then
echo "Este script debe ejecutarse como usuario ROOT"
exit 1
fi
# Lista de aplicaciones para verificar e instalar
#apps=("wget" "git" "sudo" "python3-pip" "python3-distutils" "python3-twisted" "python3-bitarray" "python3-dev" "rrdtool" "openssl" "libssl-dev" "python3-websockets" "python3-psutil")
##################
if [ -d "/var/log/mmdvm" ]
then
rm -r /var/log/mmdvm
@ -22,12 +17,9 @@ if [ -d "/opt/pYSFReflector3" ]
then
rm -r /opt/pYSFReflector3
fi
sudo groupadd mmdvm
sudo useradd mmdvm -g mmdvm -s /sbin/nologin
#sudo chown -R mmdvm:mmdvm /var/log/YSFReflector
cd /opt
git clone https://github.com/iu5jae/pYSFReflector3.git
cd pYSFReflector3/
@ -70,7 +62,6 @@ git clone --recurse-submodules -j8 https://github.com/dg9vh/WSYSFDash
cd /opt/WSYSFDash/
sudo chmod +x /opt/WSYSFDash/*
sudo chown -R root /opt/WSYSFDash
#
variable2=$(date +'%Y' | tail -c 5)
sudo sed -i "s/switch theme.*/switch theme<\/a><\/span> <\/div> <p style=\"text-align: center;\"><span class=\"text-muted\"><a title=\"Raspbian Proyect by HP3ICC © 2018-$variable2\" target=\"_blank\" href=https:\/\/gitlab.com\/hp3icc\/emq-TE1\/>Proyect: emq-TE1+<\/a><\/span>/g" /opt/WSYSFDash/html/index.html
@ -95,7 +86,6 @@ sudo sed -i "s/You can also disable the complete section within the index.html b
sudo sed -i "s/Here is the place to put some nice stuff of text you want to have placed here. You can use all html you like./Python Reflector IU5JAE, emq-TE1ws Raspbian Proyect by hp3icc./g" /opt/WSYSFDash/html/index.html
sudo sed -i "s/The image file for the logo is placed in the folder \"\/html\/img\" with the name \"logo.jpg\" - feel free to replace it with yours or replace the URL for the image with your own./ /g" /opt/WSYSFDash/html/index.html
wget https://cdn-bio.qrz.com/c/hp3icc/ysf_logo_sq_243px.jpg -O /opt/WSYSFDash/html/img/logo.jpg
##
cat > /lib/systemd/system/logtailer-ysf.service <<- "EOF"
[Unit]