From 5e92752fb539bdbec3449db66be9dc2bcef7dbd0 Mon Sep 17 00:00:00 2001 From: RaspbianProyect by HP3ICC Date: Sat, 3 Jun 2023 08:04:40 +0000 Subject: [PATCH] Update ysfreflector.sh --- install/ysfreflector.sh | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/install/ysfreflector.sh b/install/ysfreflector.sh index e44e289..f482c94 100644 --- a/install/ysfreflector.sh +++ b/install/ysfreflector.sh @@ -2,9 +2,22 @@ # YSF-Reflector ######################################################################################################################### -sudo apt install python3 python3-pip -y -sudo pip install aprslib -sudo pip install tinydb +apps=("python3" "python3-pip") + +for app in "${apps[@]}" +do + # Verificar apps + if ! dpkg -s "$app" >/dev/null 2>&1; then + # app no instalada + sudo apt-get install -y "$app" + else + # app ya instalada + echo "$app ya instalada" + fi +done + +pip3 install --force-reinstall aprslib +pip3 install --force-reinstall tinydb if [ -d "/var/log/mmdvm" ] then @@ -59,9 +72,23 @@ EOF # YSF-Reflector-Dashboard ######################################################################################################################### -sudo apt install python3-websockets -sudo pip3 install ansi2html -sudo apt install python3-psutil +apps=("python3-websockets" "python3-psutil") + +for app in "${apps[@]}" +do + # Verificar apps + if ! dpkg -s "$app" >/dev/null 2>&1; then + # app no instalada + sudo apt-get install -y "$app" + else + # app ya instalada + echo "$app ya instalada" + fi +done + +if ! command -v ansi2html &> /dev/null; then + pip3 install ansi2html +fi cd /opt/ git clone --recurse-submodules -j8 https://github.com/dg9vh/WSYSFDash