From 6a81a44ac370571e78b4a510fc66c5a4a16e981a Mon Sep 17 00:00:00 2001 From: Esteban Mackay Q Date: Mon, 7 Aug 2023 08:26:03 -0500 Subject: [PATCH] update --- README.md | 1 + update.sh | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/README.md b/README.md index 71c242e..92da5d5 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ into your ssh terminal copy and paste the following link : apt-get update apt-get install curl sudo -y + sudo su bash -c "$(curl -fsSL https://gitlab.com/hp3icc/fdmr/-/raw/main/install.sh)" diff --git a/update.sh b/update.sh index 5f6cd8a..ab1f60c 100644 --- a/update.sh +++ b/update.sh @@ -317,6 +317,25 @@ EOFA1 ## sudo cat > /opt/fdmr-update.sh <<- "EOFD1" #!/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}') if [ -z "$variable" ] then variable=0000 @@ -464,6 +483,25 @@ EOFD1 ######################################### FDMR-Monitor Update ############################################################### sudo cat > /opt/monitor-update.sh <<- "EOFB1" #!/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) variable2=$(grep "THEME_COLOR =" /opt/FDMR-Monitor/fdmr-mon.cfg) variable3=$(grep "COLOR_TEXT =" /opt/FDMR-Monitor/fdmr-mon.cfg) @@ -995,6 +1033,26 @@ EOFB1 ######################################### FDMR-Monitor2 Update ############################################################### sudo cat > /opt/monitor-update2.sh <<- "EOFB2" #!/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 then systemctl stop http.server-fdmr.service