|
|
|
@ -317,6 +317,25 @@ EOFA1
|
|
|
|
##
|
|
|
|
##
|
|
|
|
sudo cat > /opt/fdmr-update.sh <<- "EOFD1"
|
|
|
|
sudo cat > /opt/fdmr-update.sh <<- "EOFD1"
|
|
|
|
#!/bin/bash
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#####################################################################################################################
|
|
|
|
|
|
|
|
# rust
|
|
|
|
|
|
|
|
#####################################################################################################################
|
|
|
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if command -v rustc &>/dev/null; then
|
|
|
|
|
|
|
|
echo "Rust está instalado. Versión:"
|
|
|
|
|
|
|
|
rustc --version
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo "Rust no está instalado. Instalando..."
|
|
|
|
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
|
|
|
|
|
|
|
|
chmod +x rustup.sh
|
|
|
|
|
|
|
|
./rustup.sh -y
|
|
|
|
|
|
|
|
source "$HOME/.cargo/env"
|
|
|
|
|
|
|
|
rustup update
|
|
|
|
|
|
|
|
rustup update stable
|
|
|
|
|
|
|
|
echo "Rust ha sido instalado correctamente. Versión:"
|
|
|
|
|
|
|
|
rustc --version
|
|
|
|
|
|
|
|
rm rustup.sh
|
|
|
|
|
|
|
|
fi
|
|
|
|
variable=$(grep "SERVER_ID:" /opt/FreeDMR/config/FreeDMR.cfg | grep -Eo '[0-9]{1,9}')
|
|
|
|
variable=$(grep "SERVER_ID:" /opt/FreeDMR/config/FreeDMR.cfg | grep -Eo '[0-9]{1,9}')
|
|
|
|
if [ -z "$variable" ]
|
|
|
|
if [ -z "$variable" ]
|
|
|
|
then variable=0000
|
|
|
|
then variable=0000
|
|
|
|
@ -464,6 +483,25 @@ EOFD1
|
|
|
|
######################################### FDMR-Monitor Update ###############################################################
|
|
|
|
######################################### FDMR-Monitor Update ###############################################################
|
|
|
|
sudo cat > /opt/monitor-update.sh <<- "EOFB1"
|
|
|
|
sudo cat > /opt/monitor-update.sh <<- "EOFB1"
|
|
|
|
#!/bin/bash
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#####################################################################################################################
|
|
|
|
|
|
|
|
# rust
|
|
|
|
|
|
|
|
#####################################################################################################################
|
|
|
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if command -v rustc &>/dev/null; then
|
|
|
|
|
|
|
|
echo "Rust está instalado. Versión:"
|
|
|
|
|
|
|
|
rustc --version
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo "Rust no está instalado. Instalando..."
|
|
|
|
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
|
|
|
|
|
|
|
|
chmod +x rustup.sh
|
|
|
|
|
|
|
|
./rustup.sh -y
|
|
|
|
|
|
|
|
source "$HOME/.cargo/env"
|
|
|
|
|
|
|
|
rustup update
|
|
|
|
|
|
|
|
rustup update stable
|
|
|
|
|
|
|
|
echo "Rust ha sido instalado correctamente. Versión:"
|
|
|
|
|
|
|
|
rustc --version
|
|
|
|
|
|
|
|
rm rustup.sh
|
|
|
|
|
|
|
|
fi
|
|
|
|
variable1=$(grep "REPORT_NAME =" /opt/FDMR-Monitor/fdmr-mon.cfg)
|
|
|
|
variable1=$(grep "REPORT_NAME =" /opt/FDMR-Monitor/fdmr-mon.cfg)
|
|
|
|
variable2=$(grep "THEME_COLOR =" /opt/FDMR-Monitor/fdmr-mon.cfg)
|
|
|
|
variable2=$(grep "THEME_COLOR =" /opt/FDMR-Monitor/fdmr-mon.cfg)
|
|
|
|
variable3=$(grep "COLOR_TEXT =" /opt/FDMR-Monitor/fdmr-mon.cfg)
|
|
|
|
variable3=$(grep "COLOR_TEXT =" /opt/FDMR-Monitor/fdmr-mon.cfg)
|
|
|
|
@ -995,6 +1033,26 @@ EOFB1
|
|
|
|
######################################### FDMR-Monitor2 Update ###############################################################
|
|
|
|
######################################### FDMR-Monitor2 Update ###############################################################
|
|
|
|
sudo cat > /opt/monitor-update2.sh <<- "EOFB2"
|
|
|
|
sudo cat > /opt/monitor-update2.sh <<- "EOFB2"
|
|
|
|
#!/bin/bash
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#####################################################################################################################
|
|
|
|
|
|
|
|
# rust
|
|
|
|
|
|
|
|
#####################################################################################################################
|
|
|
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if command -v rustc &>/dev/null; then
|
|
|
|
|
|
|
|
echo "Rust está instalado. Versión:"
|
|
|
|
|
|
|
|
rustc --version
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo "Rust no está instalado. Instalando..."
|
|
|
|
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
|
|
|
|
|
|
|
|
chmod +x rustup.sh
|
|
|
|
|
|
|
|
./rustup.sh -y
|
|
|
|
|
|
|
|
source "$HOME/.cargo/env"
|
|
|
|
|
|
|
|
rustup update
|
|
|
|
|
|
|
|
rustup update stable
|
|
|
|
|
|
|
|
echo "Rust ha sido instalado correctamente. Versión:"
|
|
|
|
|
|
|
|
rustc --version
|
|
|
|
|
|
|
|
rm rustup.sh
|
|
|
|
|
|
|
|
fi
|
|
|
|
if systemctl status http.server-fdmr.service |grep "active" >/dev/null 2>&1
|
|
|
|
if systemctl status http.server-fdmr.service |grep "active" >/dev/null 2>&1
|
|
|
|
then systemctl stop http.server-fdmr.service
|
|
|
|
then systemctl stop http.server-fdmr.service
|
|
|
|
|
|
|
|
|
|
|
|
|